Class Resque_Failure
Inheritance | Resque_Failure |
---|
Failed Resque job.
Public Methods
Method | Description | Defined By |
---|---|---|
create() | Create a new failed job on the backend. | Resque_Failure |
getBackend() | Return an instance of the backend for saving job failures. | Resque_Failure |
setBackend() | Set the backend to use for raised job failures. The supplied backend should be the name of a class to be instantiated when a job fails. | Resque_Failure |
Method Details
Create a new failed job on the backend.
public static void create ( $payload, Exception $exception, Resque_Worker $worker, $queue ) | ||
$payload | object | The contents of the job that has just failed. |
$exception | Exception | The exception generated when the job failed to run. |
$worker | Resque_Worker | Instance of Resque_Worker that was running this job when it failed. |
$queue | string | The name of the queue that this job was fetched from. |
Return an instance of the backend for saving job failures.
public static object getBackend ( ) | ||
return | object | Instance of backend object. |
---|
Set the backend to use for raised job failures. The supplied backend should be the name of a class to be instantiated when a job fails.
It is your responsibility to have the backend class loaded (or autoloaded)
public static void setBackend ( $backend ) | ||
$backend | string | The class name of the backend to pipe failures to. |