SEAPUNK / jobber

Simple job queue.
1 stars 0 forks source link

Job retry backoff #22

Open SEAPUNK opened 8 years ago

SEAPUNK commented 8 years ago

semver-minor

Adds three fields to Job:


This changes the job retry logic to not put the job in a QUEUED state if the backoff configuration exists, and instead, put it in a DELAYED_ATTEMPT state, which also sets the attempt_wait_until field. Sets the timer for the jobs to move them out of DELAYED_ATTEMPT, and into QUEUED.

On failure, server loads DELAYED_ATTEMPT jobs at startup, loading the timers that will move them out of DELAYED_ATTEMPT and into QUEUED.


If an error occurs at this detached state, then loudly log error, and try again after 1s.