Get statistics regarding job executions


This is quite early-stage, likely to get a better interface in the future

At any point, you can look at the procrastinate_jobs table for information regarding the success rate and the average number of retries of your jobs, but this doesn’t help if you’re interested in time-related information, or if you want to search for jobs based on the date of some events they went through.

For this, there’s another table, procrastinate_events, which contains rows pointing to jobs in the procrastinate_jobs table, dates & times and events. Here’s the definition of each event:


The job has been enqueued, will be executed by the workers later.


The job was started by a worker.


The job failed, but according to the retry strategy, it should be retried (see Define a retry strategy on a task).


The job failed, and will not be retried.


The job succeeded.


The job was waiting to be executed, but was ultimately placed to failed or succeeded, bypassing execution.


This is a special event. When the job is deferred, this is the date where it’s expected to run.