scheduled_job 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scheduled_job.rb +1 -1
- data/lib/scheduled_job/version.rb +1 -1
- data/spec/lib/scheduled_job_spec.rb +2 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cef8e199094465991dc7440af386fa97eff33749
|
4
|
+
data.tar.gz: 8ec852dd635846475f9e35ded1e1a38acda824f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f096a356f01808cc56d45607a3202295537cc588f00d5703d5817b7d864e3e5c51ab680b710663f2f1112f8d30b755a0d8d3599782bc546428b5585e6013206
|
7
|
+
data.tar.gz: 4f26d8733595ab7262014a5e431d184fbe6a9ccd5642bd02dc929b760cd50e7c365bc9042fcec652fcd251fd100e8b78f3df5570df8c895cf37b710dc91208d7
|
data/lib/scheduled_job.rb
CHANGED
@@ -60,7 +60,7 @@ module ScheduledJob
|
|
60
60
|
callback = ScheduledJob.config.fast_mode
|
61
61
|
in_fast_mode = callback ? callback.call(self) : false
|
62
62
|
|
63
|
-
run_at = in_fast_mode ? Time.now.utc : time_to_recur(Time.now.utc)
|
63
|
+
run_at = in_fast_mode ? Time.now.utc + 1 : time_to_recur(Time.now.utc)
|
64
64
|
|
65
65
|
Delayed::Job.enqueue(new, :run_at => run_at, :queue => queue_name)
|
66
66
|
end
|
@@ -39,12 +39,12 @@ describe ScheduledJob do
|
|
39
39
|
config.fast_mode = lambda { |_| true }
|
40
40
|
end
|
41
41
|
end
|
42
|
-
it 'uses the current time' do
|
42
|
+
it 'uses the current time plus one second' do
|
43
43
|
time = Time.now.utc
|
44
44
|
allow(Time).to receive_message_chain(:now, :utc) { time }
|
45
45
|
|
46
46
|
expect(Delayed::Job).to receive(:enqueue).with(anything, {
|
47
|
-
:run_at => time,
|
47
|
+
:run_at => time + 1,
|
48
48
|
:queue => UnderTest.queue_name
|
49
49
|
})
|
50
50
|
UnderTest.schedule_job
|
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.0.
|
4
|
+
version: 0.0.4
|
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: 2014-
|
14
|
+
date: 2014-09-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: delayed_job
|
@@ -165,4 +165,3 @@ summary: Adding support for jobs that need to reccur
|
|
165
165
|
test_files:
|
166
166
|
- spec/lib/scheduled_job_spec.rb
|
167
167
|
- spec/spec_helper.rb
|
168
|
-
has_rdoc:
|