Providers
Writing your own Custom Provider
/**
* Persists a serialized job to the Queue Connection
*
* @queueName The queue name for the job.
* @job The Job to serialize and push to the queue.
* @delay The delay (in seconds) before working the job.
* @attempts The current attempt number.
*
* @return AbstractQueueProvider
*/
public any function push(
required string queueName,
required AbstractJob job
numeric delay = 0,
numeric attempts = 0
);
/**
* Starts a worker for a Worker Pool on this Queue Connection.
*
* @pool The Worker Pool that is working this Queue Connection.
*
* @return A function that when called will stop this worker.
*/
public function function startWorker( required WorkerPool pool );
/**
* Starts any background processes needed for the Worker Pool.
*
* @pool The Worker Pool that is working this Queue Connection.
*
* @return AbstractQueueProvider
*/
public any function listen( required WorkerPool pool );Last updated