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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1dc50c93ff5bc74fac03fa21b0b801965b61d5ff
4
- data.tar.gz: fdd37637012521cfa3210e3ef5f67c2150b63bf5
3
+ metadata.gz: cef8e199094465991dc7440af386fa97eff33749
4
+ data.tar.gz: 8ec852dd635846475f9e35ded1e1a38acda824f6
5
5
  SHA512:
6
- metadata.gz: 09ea727564792be7b830bef05c9ff0cedebb375d7f801e7be3d646c19016e207944b8285c974bd5384f00771bfd8ef3ce512e5b31e7346f233b1650bf3af1ac1
7
- data.tar.gz: 61ddd588eb11ca8d9607f3d89511447065cb1abedd753ae26c32162984359178c999cd20c099130b811767d4ab6d591565b0e98b96dd6a66cb9549133c0c5fdd
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
@@ -1,3 +1,3 @@
1
1
  module ScheduledJob
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  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.3
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-08-27 00:00:00.000000000 Z
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: