Module: Resque::Lifecycle::ClassMethods
- Defined in:
- lib/resque/lifecycle.rb
Instance Method Summary collapse
-
#push(queue, item) ⇒ Object
Wrapper for the original Resque push method, which adds a created_at timestamp to any
itempushed onto the queue which responds to #[]=.
Instance Method Details
#push(queue, item) ⇒ Object
Wrapper for the original Resque push method, which adds a created_at timestamp to any item pushed onto the queue which responds to #[]=.
18 19 20 21 22 23 |
# File 'lib/resque/lifecycle.rb', line 18 def push(queue, item) if item.respond_to?(:[]=) item[:created_at] = Time.now.to_i end push_without_lifecycle queue, item end |