2

I'm trying to pass a value from inside my job to the status hash, exactly as described here: https://github.com/quirkey/resque-status#passing-back-data-from-the-job

But I don't understand how I'm supposed to do it. Here's my job class:

module ResqueJobs
  class MyJob
    include Resque::Plugins::Status

    @queue = :jobs_queue

    def perform
      self.status['output_url'] = 'something'
    end

  end
end

But when I check the job after completion:

status = Resque::Plugins::Status::Hash.get(job_id)

logger.debug('STATUS CHECK:')
logger.debug(status.to_s)

The 'output_url' key is never there.

Yarin
  • 173,523
  • 149
  • 402
  • 512
  • facing the same issue. there is a github issue that describes a workaround, but it didn't work for me: https://github.com/quirkey/resque-status/issues/66 – sbauch Mar 29 '14 at 22:12

1 Answers1

0

The following worked for me:

set_status(key: "value", another_key: "another_value")