Compare commits

...

2 commits

Author SHA1 Message Date
Reid 'arrdem' McKenzie
2645fa909b Fix: do not try to re-map assigned and pending jobs 2023-07-20 00:18:03 -06:00
Reid 'arrdem' McKenzie
0778cc077f Fix: Need to return user_id here for the jobs list 2023-07-20 00:13:38 -06:00
2 changed files with 7 additions and 0 deletions
projects/tentacles/src/python/tentacles

View file

@ -83,6 +83,8 @@ SELECT
, j.started_at
, j.cancelled_at
, j.finished_at
, j.user_id
, j.printer_id
FROM jobs j
INNER JOIN files f
ON j.file_id = f.id

View file

@ -152,6 +152,11 @@ def assign_jobs(app: App, db: Db) -> None:
"""Assign jobs to printers. Uploading files and job state management is handled separately."""
for job in db.list_job_queue(uid=None):
# FIXME: Jobs which have been mapped are still in the "queue" until they finish
# Ignore such as they have already been mapped
if job.printer_id:
continue
for printer in db.list_idle_printers():
if (
job.analysis_id is not None