diff --git a/src/app.py b/src/app.py index 870589b..e1dd3bb 100644 --- a/src/app.py +++ b/src/app.py @@ -15,7 +15,6 @@ async def create(input: ExecutionInput, background_tasks: BackgroundTasks): id=str(uuid.uuid4()) create_execution(id, input, background_tasks) return create_job(id) - @app.get('/{id}') def get_status(id): diff --git a/src/job_manager.py b/src/job_manager.py index 9e53210..d735a67 100644 --- a/src/job_manager.py +++ b/src/job_manager.py @@ -18,12 +18,11 @@ def update_job_status(id, isDone): job.status = ExecutionStatus.COMPLETED else: job = Job(id = id, status = ExecutionStatus.COMPLETED, createdAt = format_timestamp(time.time())) - elif not isDone and not job: - job = Job(id = id, status = ExecutionStatus.IN_PROGRESS, createdAt = format_timestamp(time.time())) - + elif not isDone and job: + job.status = ExecutionStatus.IN_PROGRESS + jobs[id] = job return job def delete_job(id): del jobs[id] - \ No newline at end of file