diff --git a/eve/api/api.py b/eve/api/api.py index 246f39d..226d715 100644 --- a/eve/api/api.py +++ b/eve/api/api.py @@ -224,7 +224,8 @@ def fastapi_app(): @app.function( image=image, - schedule=modal.Period(minutes=15) + schedule=modal.Period(minutes=15), + timeout=3600 ) async def postprocessing(): try: diff --git a/eve/api/api_requests.py b/eve/api/api_requests.py index 5cd248b..ab4776d 100644 --- a/eve/api/api_requests.py +++ b/eve/api/api_requests.py @@ -14,7 +14,7 @@ class TaskRequest(BaseModel): class CancelRequest(BaseModel): task_id: str - user_id: str + user: str class UpdateConfig(BaseModel): diff --git a/eve/api/handlers.py b/eve/api/handlers.py index aaf539e..b272646 100644 --- a/eve/api/handlers.py +++ b/eve/api/handlers.py @@ -53,7 +53,7 @@ async def handle_create(request: TaskRequest): @handle_errors async def handle_cancel(request: CancelRequest): task = Task.from_mongo(request.task_id) - if str(task.user) != request.user_id: + if str(task.user) != request.user: raise APIError( "Unauthorized: Task user does not match user_id", status_code=403 )