scheduled_job 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/lib/scheduled_job/version.rb +1 -1
- data/lib/scheduled_job.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 712f66200583b9e067a22f431affda4671d851fe
|
4
|
+
data.tar.gz: e1cd08470ad32b62426ef84fbbe7beacff5d67e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fde7757c4786f6e662025793b4c8898b6d8662ae34ebb93dd309fdac1c19443bb7a0d240938406e1656db9ec7a2420f0ddf601569f29fc1327b0a77cdf00cae
|
7
|
+
data.tar.gz: d3ee92b75600556d67947287ae7c6885276675d5a8a3dbb708cf407b50a7afb19965e8bcf346ea5dc67fa65bc0ded48626052a2634ca88bca896eb7953899f32
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -25,3 +25,6 @@ Adds a config to allow the scheduling for more than one instance of the same job
|
|
25
25
|
|
26
26
|
# 0.1.1
|
27
27
|
Allows jobs in config to be strings, symbols, or classes. If a string or symbol is provided, it will be resolved to a constant before scheduling the job.
|
28
|
+
|
29
|
+
# 0.1.2
|
30
|
+
Falls back to the Delayed Job default queue name if none is provided. Ensures that the run at is set using UTC timezone. Updates specs to run on the latest ruby version on CI.
|
data/lib/scheduled_job.rb
CHANGED
@@ -68,7 +68,7 @@ module ScheduledJob
|
|
68
68
|
|
69
69
|
def failure(job)
|
70
70
|
ScheduledJob.logger.error("DelayedJob failed: processing job in queue #{self.class.queue_name} failed")
|
71
|
-
job.update_attributes!(:failed_at => Time.now)
|
71
|
+
job.update_attributes!(:failed_at => Time.now.utc)
|
72
72
|
self.class.schedule_job
|
73
73
|
end
|
74
74
|
|
@@ -91,10 +91,6 @@ module ScheduledJob
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
-
def queue_name
|
95
|
-
"Default"
|
96
|
-
end
|
97
|
-
|
98
94
|
def random_minutes(base, random_delta)
|
99
95
|
random_delta *= -1 if random_delta < 0
|
100
96
|
(base + Random.new.rand((-1 * random_delta)..random_delta)).minutes
|
@@ -119,5 +115,9 @@ module ScheduledJob
|
|
119
115
|
def run_duration_threshold
|
120
116
|
self.const_defined?(:RUN_DURATION_THRESHOLD) ? self::RUN_DURATION_THRESHOLD : nil
|
121
117
|
end
|
118
|
+
|
119
|
+
def queue_name
|
120
|
+
Delayed::Worker.default_queue_name
|
121
|
+
end
|
122
122
|
end
|
123
123
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scheduled_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CallumD
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-
|
14
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: delayed_job
|