procrastinate: A canceled task that completes fails with "Job was not found or not in "doing" or "todo" status"

A task that is canceled has it status set to FAILED, however when the task completes only DOING and TODO is accepted for task completion. This causes procrastinate to fail and terminate itโ€™s process.

https://github.com/procrastinate-org/procrastinate/blob/65829b3fc17374985ee17c2911083f60132f1bfd/procrastinate/shell.py#L142 https://github.com/procrastinate-org/procrastinate/blob/65829b3fc17374985ee17c2911083f60132f1bfd/procrastinate/sql/schema.sql#L207

Dec 30 16:24:00 host1 python3[1280546]: Error:
Dec 30 16:24:00 host1 python3[1280546]:     Database error.
Dec 30 16:24:00 host1 python3[1280546]:     
Dec 30 16:24:00 host1 python3[1280546]: Job was not found or not in "doing" or "todo" status (job id: 47)
Dec 30 16:24:00 host1 python3[1280546]: CONTEXT:  PL/pgSQL function procrastinate_finish_job(integer,procrastinate_job_status,timestamp with time zone,boolean) line 24 at RAISE
Dec 30 16:24:00 host1 systemd[1]: procrastinate.service: Main process exited, code=exited, status=1/FAILURE
Dec 30 16:24:00 host1 systemd[1]: procrastinate.service: Failed with result 'exit-code'.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 22 (19 by maintainers)

Most upvoted comments

You get my ok ๐Ÿ˜ƒ