Bugfix: don't mark successes as failures by accident
This commit is contained in:
parent
0d0f54bcce
commit
d3d55691a7
2 changed files with 2 additions and 1 deletions
|
@ -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!
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue