StudioBonito\SilverStripe\Queue\Jobs\AbstractJob
Synopsis
class AbstractJob
{
- // members
- protected Injector $injector;
- protected $instance;
- protected $queue;
- protected bool $deleted = false;
- // methods
- public abstract void run()
- public void delete()
- public bool isDeleted()
- public abstract void release()
- public abstract int attempts()
- public abstract string getRawPayload()
- protected void resolveAndRun()
- protected mixed resolve()
- protected array parseJob()
- public bool autoDelete()
- protected int getSeconds()
- public int getTime()
- public string getQueue()
Members
protected
- $deleted
—
StudioBonito\SilverStripe\Queue\Jobs\bool
Indicates if the job has been deleted. - $injector
—
\Injector
The injector instance. - $instance — mixed
- $queue — string
Methods
protected
- getSeconds() — Calculate the number of seconds with the given delay.
- parseJob() — Parse the job declaration into class and method.
- resolve() — Resolve the given job handler.
- resolveAndRun() — Resolve and fire the job handler method.
public
- attempts() — Get the number of times the job has been attempted.
- autoDelete() — Determine if job should be auto-deleted.
- delete() — Delete the job from the queue.
- getQueue() — Get the name of the queue the job belongs to.
- getRawPayload() — Get the raw payload string for the job.
- getTime() — Get the current UNIX timestamp.
- isDeleted() — Determine if the job has been deleted.
- release() — Release the job back into the queue.
- run() — Run the job.