delayed_job_extras 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,7 +104,6 @@ module DJ
104
104
  self.dj_object.touch(:finished_at) if self.dj_object
105
105
  return val
106
106
  rescue Exception => e
107
- puts e
108
107
  # send to hoptoad!
109
108
  notify_hoptoad(e)
110
109
  self.logger.error("Halted #{self.class.name}#perform (DJ.id = '#{dj_id}') [FAILURE]")
@@ -1,15 +1,13 @@
1
1
  module Delayed
2
2
  class Job
3
3
 
4
- def self.enqueue(obj, *args)
5
- if obj.respond_to?(:dj_object)
6
- if obj.dj_object.nil?
7
- obj.dj_object = Delayed::Job.new
8
- end
4
+ class << self
5
+ def enqueue_with_work_off(obj, *args)
6
+ enqueue_without_work_off(obj, *args)
7
+ Delayed::Job.work_off
9
8
  end
10
- obj.perform
11
- obj.respond_to?(:dj_object) ? obj.dj_object : nil
9
+ alias_method_chain :enqueue, :work_off
12
10
  end
13
11
 
14
12
  end
15
- end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates