SEAPUNK / jobber

Simple job queue.
1 stars 0 forks source link

Job retrying #21

Open SEAPUNK opened 8 years ago

SEAPUNK commented 8 years ago

semver-minor

Adds three fields to Job:


This changes the failure behavior, by putting the job into an intermediate FAILED_ATTEMPT state instead of the final FAILED state.

Once job fails, the attempt logic runs for the job, which either puts the job from FAILED_ATTEMPT state, to a final FAILED state, or back to the QUEUED state, incrementing the current_attempt field.

On failure between two atomic operations (job intermediate failure logic -> job retry logic), the server starts back up, and fetches all FAILED_ATTEMPT jobs, re-running the job retry logic.