Skip to content

Allow re-queueing of "exception" jobs #315

@mnbbrown

Description

@mnbbrown

One of the very useful features of https://github.com/gocardless/que is holding "exception" jobs so they can be re-queued manually, or manually deleted. How it does this depends on the retry behaviour:

  • without backoff: the status is set to "failed" and the execute_after is set to NULL (i.e. failed, never attempt to re-queue)
  • with backoff: the status is not changed, but the execute_after is set to the next backoff timestamp (i.e. re-attempt)

I see a couple of options here:

  1. Store the job payload in the job statistics table. This means re-queueing jobs would be a matter of moving jobs back from pgqueuer_statistics to pgqueuer to trigger a retry.
  2. Adding first class support to the pgqueuer table (a new status such as "failed"). This would also mean allowing executor's to customise what happens to a job after they are executed.

Thoughts? I'll experiment in my branch..

P.S. sorry I dropped off the radar before Christmas - things got very busy.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions