Resque::Job - Resque job container
version 0.29
Provides 'redis' method, which provides access to our redis subsystem.
Worker running this job. A new worker will be popped up from resque by default.
Class to be performed by this job.
Name of the queue this job is or should be.
Array of arguments for this job.
HashRef representation of the job. When passed to constructor, this will restore the job from encoded state. When passed as a string this will be coerced using JSON decoder. This is read-only.
String representation(JSON) to be used on the backend.
$job->encode();
Returns a string version of the job, like
'(Job{queue_name) | ClassName | args_encoded)'
my $stringified = $job->stringify();
Normalize class name to be used as queue name.
my $queue_name = $job->queue_from_class(); NOTE: future versions will try to get the queue name from the real class attr or $class::queue global variable.
Load job class and call perform() on it. This job object will be passed as the only argument.
$job->perform();
Add this job to resque. See Rescue::push().
$job->enqueue();
Remove this job from resque using the most restrictive form of Resque::mass_dequeue. This method will remove all jobs matching this object queue, class and args.
See Resque::mass_dequeue() for massive destruction.
Store a failure (or arrayref of failures) on this job.
$job->fail( "error message'); # or $job->fail( ['msg1', 'msg2'] );
Diego Kuperman <diego@freekeylabs.com>
This software is copyright (c) 2015 by Diego Kuperman.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Resque, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Resque
CPAN shell
perl -MCPAN -e shell install Resque
For more information on module installation, please visit the detailed CPAN module installation guide.