0.01
No commit activity in last 3 years
No release in over 3 years
If you want to be able fetch the result from a Resque job's perform method. Results will be encoded using JSON. For example: require 'resque-result' class MyJob extend Resque::Plugins::Result def self.perform(meta_id, big_num) factor(big_num) end end meta0 = MyJob.enqueue(3574406403731) meta0.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010' meta0.meta_id # => '03c9e1a045ad012dd20500264a19273c' # later meta1 = MyJob.get_meta('03c9e1a045ad012dd20500264a19273c') meta1.succeeded? # => true meta1.result # => [ 1299709, 2750159 ]
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.9
 Project Readme

Resque Result

A Resque plugin. Requires Resque 1.8.

If you want to be able fetch the result from a Resque job's perform method. Results will be encoded using JSON.

For example:

require 'resque-result'

class MyJob
  extend Resque::Plugins::Result

  def self.perform(meta_id, big_num)
    factor(big_num)
  end
end

meta0 = MyJob.enqueue(3574406403731)
meta0.enqueued_at # => 'Wed May 19 13:42:41 -0600 2010'
meta0.meta_id # => '03c9e1a045ad012dd20500264a19273c'

# later
meta1 = MyJob.get_meta('03c9e1a045ad012dd20500264a19273c')
meta1.succeeded? # => true
meta1.result # => [ 1299709, 2750159 ]