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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 640363fb32bb0a5e6c6d7b9ce47109bb4d26244e
4
- data.tar.gz: 43481093dd233b479c4fa4c5809cee3b547911d2
3
+ metadata.gz: 555a748fae5d290be3bb712ab440479dacf0c9fe
4
+ data.tar.gz: 8e2c7552fc996199993c6cfee732f094e2d8eb22
5
5
  SHA512:
6
- metadata.gz: 2957cc62da166c65fc5ea481a39a903d6a6e2a533aa3f4b0a81171a0975b9d0ce253b995bdd3d9a61b4e729d4d7cb1252c515346750840e04c66955af3eed0b5
7
- data.tar.gz: cb43747010d8c0aa4243a4d8d161270d54d4b2e19a75acb2dd9f446415157d70047bfa889a3e5ff61187abd7be7905019bf8e50abc88bb5cc7be36ab17e2727c
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
- self.perform_at ts.to_f
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
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Repeat
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  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.0
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-12 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq