Method |
Description |
|
__construct ( string | array $queues ) |
Instantiate a new worker, given a list of queues that it should be working
on. The list of queues should be supplied in the priority that they should
be checked for jobs (first come, first served) |
|
__toString ( ) : string |
Generate a string representation of this worker. |
|
all ( ) : array |
Return all workers known to Resque as instantiated instances. |
|
doneWorking ( ) |
Notify Redis that we've finished working on a job, clearing the working
state and incrementing the job stats. |
|
exists ( string $workerId ) : boolean |
Given a worker ID, check if it is registered/valid. |
|
find ( string $workerId ) : Resque_Worker |
Given a worker ID, find it and return an instantiated worker class for it. |
|
getStat ( string $stat ) : integer |
Get a statistic belonging to this worker. |
|
job ( ) : object |
Return an object describing the job this worker is currently working on. |
|
killChild ( ) |
Kill a forked child job immediately. The job it is processing will not
be completed. |
|
pauseProcessing ( ) |
Signal handler callback for USR2, pauses processing of new jobs. |
|
perform ( Resque_Job $job ) |
Process a single job. |
|
pruneDeadWorkers ( ) |
Look for any workers which should be running on this server and if
they're not, remove them from Redis. |
|
queues ( boolean $fetch = true ) : array |
Return an array containing all of the queues that this worker should use
when searching for jobs. |
|
registerWorker ( ) |
Register this worker in Redis. |
|
reserve ( boolean $blocking = false, integer $timeout = null ) : object | boolean |
|
|
setId ( string $workerId ) |
Set the ID of this worker to a given ID string. |
|
setLogger ( Psr\Log\LoggerInterface $logger ) |
Inject the logging object into the worker |
|
shutdown ( ) |
Schedule a worker for shutdown. Will finish processing the current job
and when the timeout interval is reached, the worker will shut down. |
|
shutdownNow ( ) |
Force an immediate shutdown of the worker, killing any child jobs
currently running. |
|
unPauseProcessing ( ) |
Signal handler callback for CONT, resumes worker allowing it to pick
up new jobs. |
|
unregisterWorker ( ) |
Unregister this worker in Redis. (shutdown etc) |
|
work ( integer $interval = Resque::DEFAULT_INTERVAL, $blocking = false ) |
The primary loop for a worker which when called on an instance starts
the worker's life cycle. |
|
workerPids ( ) : array |
Return an array of process IDs for all of the Resque workers currently
running on this machine. |
|
workingOn ( Resque_Job $job ) |
Tell Redis which job we're currently working on. |
|