Mosquito::Job
Inherits Mosquito::Serializers::Primitives < Reference < Object
A Job is a definition for work to be performed. Jobs are pieces of code which run a JobRun.
- Jobs prevent double execution of a job for a job_run
- Jobs Rescue when a #perform method fails a job_run for any reason
- Jobs can be rescheduleable
Constants
Class methods
The queue this job is assigned to. By default every job has it's own named queue:
- EmailTheUniverseJob.queue = "email_the_universe"
Instance methods
To be called from inside a #perform Marks this job as a failure. By default, if the job is a candidate for re-scheduling, it will be run again at a later time.
abstract, override if desired.
For a given retry count, how long should the delay between job attempts be?
abstract, override if desired.
For a given retry count, is this job rescheduleable?
abstract, override if desired.
True if this job is rescheduleable, false if not.
When a job run fails, should it be added to the retry queue? See: #fail(retry: false)
When a job run fails, should it be added to the retry queue? See: #fail(retry: false)