Sha256: 9ce4779f390d782bcb0027801d49c6e8e189e9998f1ea917fa7eb53e5c75ed6a

Contents?: true

Size: 718 Bytes

Versions: 1

Compression:

Stored size: 718 Bytes

Contents

Resque Result
=============

A [Resque][rq] 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 ]

[rq]: http://github.com/defunkt/resque

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
resque-result-1.0.1 README.md