rekiq 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rekiq/version.rb +1 -1
- data/lib/rekiq/worker.rb +3 -3
- data/spec/rekiq/worker_spec.rb +15 -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: 5ab17f1066259e1b4fce0a5391f53892d24623f8
|
4
|
+
data.tar.gz: 8e5c4948b2489f7da947a1b217f795f9fdf350b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6753e66d5b3e4163949f5f53d2078d6d40c300ae626db977c0a4acc3729114a1726bffbfee2fa7e7806d29cc528e061ed4e0f7354799be1beaf3fa7b7451b276
|
7
|
+
data.tar.gz: 919abea474e6f00c19ac3b78a9c9ba1bc84a8bf05dc7982faa55667a1090fa11cafd9b41b905325971b5880d226da0bda16da62efc3aaf9b7ee083173bff88d5
|
data/lib/rekiq/version.rb
CHANGED
data/lib/rekiq/worker.rb
CHANGED
@@ -44,9 +44,9 @@ module Rekiq
|
|
44
44
|
.schedule
|
45
45
|
|
46
46
|
if jid.nil?
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
::Sidekiq.logger.info \
|
48
|
+
"recurring work for #{name} scheduled for " \
|
49
|
+
"#{work_time} with jid #{jid}"
|
50
50
|
end
|
51
51
|
|
52
52
|
jid
|
data/spec/rekiq/worker_spec.rb
CHANGED
@@ -26,6 +26,21 @@ describe Rekiq::Worker do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
describe '.perform_recurringly' do
|
29
|
+
context 'for schedule that does not return next occurrence' do
|
30
|
+
let(:schedule) { IceCube::Schedule.new(Time.now - 3600) }
|
31
|
+
before do
|
32
|
+
@jid = ExampleWorker.perform_recurringly(schedule)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'returns nil' do
|
36
|
+
expect(@jid).to eq(nil)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'does not schedule worker' do
|
40
|
+
expect(ExampleWorker.jobs.count).to eq(0)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
29
44
|
context 'scheduled one hour from now' do
|
30
45
|
let(:time) { Time.now + 3600 }
|
31
46
|
let(:schedule) { IceCube::Schedule.new(time) }
|