sidekiq-repeat 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/repeat/repeatable.rb +6 -1
- data/lib/sidekiq/repeat/version.rb +1 -1
- 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: 555a748fae5d290be3bb712ab440479dacf0c9fe
|
4
|
+
data.tar.gz: 8e2c7552fc996199993c6cfee732f094e2d8eb22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0f3e27069e456a46df3d0c9bf0e805c2572e1fe322ce252ea958f9aac386e88e945bccee700ba88e8046f6ec6e9942e7e53ac8faef1158131c14d28773c99df
|
7
|
+
data.tar.gz: 1ebb70fed3d51399368fbb7a67e566e6431751d06e3662884fd0fb654ad8d5a07ae2c6d2a640b59e725d7edfe84cbab39370d82271ab289f22c1734152a52358
|
@@ -14,10 +14,15 @@ module Sidekiq
|
|
14
14
|
return if already_scheduled?
|
15
15
|
|
16
16
|
ts = @cronline.next
|
17
|
-
|
17
|
+
args = repeat_arguments(ts)
|
18
|
+
self.perform_at ts.to_f, *args
|
18
19
|
Sidekiq.logger.info "Scheduled #{self.name} for #{ts}."
|
19
20
|
end
|
20
21
|
|
22
|
+
def repeat_arguments(ts)
|
23
|
+
[Time.now.to_f, ts.to_f].compact.take(instance_method(:perform).arity)
|
24
|
+
end
|
25
|
+
|
21
26
|
def repeat_configured?
|
22
27
|
!!@cronline
|
23
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-repeat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FlavourSys Technology GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|