Bugfix: don't mark successes as failures by accident

This commit is contained in:
Reid 'arrdem' McKenzie 2023-06-03 19:53:29 -06:00
parent 0d0f54bcce
commit d3d55691a7
2 changed files with 2 additions and 1 deletions

View file

@ -576,6 +576,7 @@ SET
, message = :message , message = :message
WHERE WHERE
id = :jid id = :jid
AND finished_at IS NULL -- guard against calling this twice
; ;
-- name: delete-job! -- name: delete-job!

View file

@ -230,7 +230,7 @@ def pull_jobs(app: App, db: Db) -> None:
log.info(f"Job {job.id} has been acknowledged as cancelled") log.info(f"Job {job.id} has been acknowledged as cancelled")
db.finish_job(jid=job.id, state="cancelled") db.finish_job(jid=job.id, state="cancelled")
if printer_state.get("printing"): elif printer_state.get("printing"):
pass pass
else: else: