NAME
Resque::Job - Resque job container
VERSION
version 0.01
ATTRIBUTES
resque
worker Worker running this job. A new worker will be popped up from resque by default.
class Class to be performed by this job.
queue Name of the queue this job is or should be.
args Array of arguments for this job.
payload 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.
METHODS
encode String representation(JSON) to be used on the backend.
stringify
queue_from_class Normalize class name to be used as queue name.
NOTE: future versions will try to get the
queue name from the real class attr
or $class::queue global variable.
perform Load job class and call perform() on it. This job objet will be passed as the only argument.
enqueue Add this job to resque. See Rescue::push().
dequeue 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.
fail Store a failure on this job.
AUTHOR
Diego Kuperman <diego@freekeylabs.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 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.