database engine_config updated
This commit is contained in:
parent
fa66741b48
commit
410ee2d6c4
|
|
@ -9,10 +9,11 @@ from sqlalchemy.ext.declarative import declarative_base
|
|||
|
||||
engine_config = {
|
||||
"url": WagDatabase.DATABASE_URL,
|
||||
"pool_size": 10,
|
||||
"max_overflow": 0,
|
||||
"pool_size": 20,
|
||||
"max_overflow": 10,
|
||||
"echo": False,
|
||||
"isolation_level": "READ COMMITTED",
|
||||
"pool_pre_ping": True,
|
||||
}
|
||||
|
||||
engine = create_engine(**engine_config)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
|
|||
EndpointRestriction.endpoint_name.ilike(f"%{data.endpoint}%"),
|
||||
system=True,
|
||||
).data
|
||||
print("endpoint", endpoint)
|
||||
if not endpoint:
|
||||
EndpointRestriction.raise_http_exception(
|
||||
status_code="HTTP_404_NOT_FOUND",
|
||||
|
|
@ -85,9 +84,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
|
|||
data={},
|
||||
)
|
||||
event = Events.filter_one(Events.endpoint_id == endpoint.id).data
|
||||
print("event", event)
|
||||
service = Service2Events.filter_one(Service2Events.event_id == event.id).data
|
||||
print("service", service)
|
||||
if isinstance(token_dict, OccupantTokenObject):
|
||||
event_occupant = Event2Occupant.filter_one(
|
||||
Event2Occupant.event_service_id == service.service_id,
|
||||
|
|
@ -110,7 +107,6 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
|
|||
Event2Employee.event_service_id == service.service_id,
|
||||
Event2Employee.employee_id == token_dict.selected_company.employee_id,
|
||||
).data
|
||||
print("event_employee", event_employee)
|
||||
if not event_employee:
|
||||
EndpointRestriction.raise_http_exception(
|
||||
status_code="HTTP_404_NOT_FOUND",
|
||||
|
|
|
|||
Loading…
Reference in New Issue