delayed_job_extras 0.1.5 → 0.1.6

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.
@@ -13,6 +13,13 @@ module Delayed
13
13
  self['handler'] = object.to_yaml
14
14
  end
15
15
 
16
+ def invoke_job_with_dj
17
+ payload_object.dj_object = self if payload_object.respond_to?(:dj_object)
18
+ invoke_job_without_dj
19
+ end
20
+
21
+ alias_method_chain :invoke_job, :dj
22
+
16
23
  class << self
17
24
 
18
25
  def stats(start_date = 1.day.ago.beginning_of_day, end_date = Time.now.beginning_of_day)
@@ -3,6 +3,8 @@ module Delayed
3
3
 
4
4
  PRIORITY_LEVELS = {:immediate => 10000, :high => 1000, :medium => 500, :normal => 0, :low => -100, :who_cares => -1000}
5
5
 
6
+ attr_accessor :dj_object
7
+
6
8
  def priority=(x)
7
9
  @priority = x
8
10
  end
@@ -15,6 +17,7 @@ module Delayed
15
17
  include HoptoadNotifier::Catcher
16
18
  else
17
19
  def notify_hoptoad(e)
20
+ logger.error(e)
18
21
  end
19
22
  end
20
23
 
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.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-07 00:00:00 -04:00
12
+ date: 2009-09-11 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15