Resque Meta
A Resque plugin. Requires Resque 1.8 and Redis 2+.
If you want to be able to add metadata for a job to track anything you want, extend it with this module.
For example:
require 'resque-meta'
class MyJob
extend Resque::Plugins::Meta
def self.perform(, *args)
heavy_lifting
end
end
= MyJob.enqueue('stuff')
.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010'
. # => '03c9e1a045ad012dd20500264a19273c'
['foo'] = 'bar' # => 'bar'
.save
# later
= MyJob.('03c9e1a045ad012dd20500264a19273c')
.job_class # => MyJob
.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010'
['foo'] # => 'bar'