0.05
No commit activity in last 3 years
No release in over 3 years
A Resque plugin. 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(meta_id, *args) heavy_lifting end end meta0 = MyJob.enqueue('stuff') meta0.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010' meta0.meta_id # => '03c9e1a045ad012dd20500264a19273c' meta0['foo'] = 'bar' # => 'bar' meta0.save # later meta1 = MyJob.get_meta('03c9e1a045ad012dd20500264a19273c') meta1.job_class # => MyJob meta1.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010' meta1['foo'] # => 'bar'
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 0.9.2

Runtime

~> 1.8
 Project Readme

Resque Meta

Build Status

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(meta_id, *args)
    heavy_lifting
  end
end

meta0 = MyJob.enqueue('stuff')
meta0.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010'
meta0.meta_id # => '03c9e1a045ad012dd20500264a19273c'
meta0['foo'] = 'bar' # => 'bar'
meta0.save

# later
meta1 = MyJob.get_meta('03c9e1a045ad012dd20500264a19273c')
meta1.job_class # => MyJob
meta1.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010'
meta1['foo'] # => 'bar'