Reputation: 183909
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.
Upvotes: 2
Views: 342
Reputation: 151
The following worked for me:
set_status(key: "value", another_key: "another_value")
Upvotes: 0