Module: Marginalia::Resque
- Defined in:
- lib/marginalia-resque/version.rb,
lib/marginalia-resque.rb
Constant Summary collapse
- VERSION =
"0.0.2"
Class Method Summary collapse
Class Method Details
.clear_after_job! ⇒ Object
19 20 21 22 |
# File 'lib/marginalia-resque.rb', line 19 def self.clear_after_job! Marginalia::Comment.comment = Marginalia::Resque.previous_comment Marginalia::Resque.previous_comment = nil end |
.update_with_job!(job_klass, params) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/marginalia-resque.rb', line 11 def self.update_with_job!(job_klass, params) if Array === params && params.size == 1 && Hash === params[0] params = params[0] end Marginalia::Resque.previous_comment = Marginalia::Comment.comment Marginalia::Comment.comment = "job:#{job_klass.name},params:#{params.to_json[0,100]}" end |