delayed_job_recurring 0.3.2 → 0.3.3
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.
- checksums.yaml +4 -4
- data/lib/delayed/recurring_job.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2ae8e1e8cecdfe93a271741711bd050e236cf5b
|
4
|
+
data.tar.gz: 59acb86a97a3fc1afa70d8f5da3c2bc7fef53e3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 897ecf75d27013390fbec0420336e15f76cca8e9703cf14260e957dd6cbd8aab7e58b53d5ab652663df42bd2124f09c0ddcb4901b9951aec270bdd3e0aae6a7c
|
7
|
+
data.tar.gz: 068988bd31f6595e26311057f1aafe192eb3377bc76b2d5178dba90519f3f35a05362a612d42994c4e2bf45f4ac606ec9e3a9311cba70f9d9dcf746cf58aa6bb
|
@@ -113,6 +113,10 @@ module Delayed
|
|
113
113
|
if times.length == 0
|
114
114
|
@run_at || run_every.from_now
|
115
115
|
else
|
116
|
+
if @run_at_inherited
|
117
|
+
@run_at = []
|
118
|
+
@run_at_inherited = nil
|
119
|
+
end
|
116
120
|
@run_at ||= []
|
117
121
|
@run_at.concat times
|
118
122
|
end
|
@@ -168,6 +172,14 @@ module Delayed
|
|
168
172
|
jobs.count > 0
|
169
173
|
end
|
170
174
|
|
175
|
+
def inherited(subclass)
|
176
|
+
%i(@run_at @run_interval @tz @priority).each do |var|
|
177
|
+
next unless instance_variable_defined? var
|
178
|
+
subclass.instance_variable_set var, self.instance_variable_get(var)
|
179
|
+
subclass.instance_variable_set "#{var}_inherited", true
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
171
183
|
end # ClassMethods
|
172
184
|
end # RecurringJob
|
173
185
|
|