Skip to content
Snippets Groups Projects
Commit 5ada856f authored by Matthieu Simon's avatar Matthieu Simon
Browse files

fix job current frame updating

parent c3a705d9
No related branches found
No related tags found
No related merge requests found
......@@ -137,7 +137,7 @@ class JobListApi(Resource):
if job.status == 'running':
self.stop(job_id)
tasks = Task.query.filter_by(job_id=job_id)
tasks = db.session.query(Task).filter(Task.job_id == job_id, Task.status.notin_(['finished','failed']))
best_managers = filter(lambda m : m.total_workers == -1, app.config['MANAGERS'])
if best_managers:
......
......@@ -352,6 +352,10 @@ class TaskApi(Resource):
# if task.current_frame == job.frame_end:
# job.status = 'finished'
db.session.add(job)
if task.chunk_end > job.current_frame:
job.current_frame = task.chunk_end
db.session.add(job)
db.session.commit()
Thread(target=TaskApi.dispatch_tasks).start()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment