sidekiq-repeat 0.1.2 → 0.1.3
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 +10 -3
- data/lib/sidekiq/repeat/version.rb +1 -1
- metadata +27 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d56572cdb47b91cd6bd545d668bdb4fd91d23b1f
|
4
|
+
data.tar.gz: 4414677211213ae64627ef2b7340e8a78ac9f3c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3614d9955d30d5542c62dd2912a2c35b32be7cfefa19dfef30ee200ad3393a560f6bf0316d8c3504cbe34d4b6d62c6ce14a63e3a72cdb5e4b7ed7fc75b0618c
|
7
|
+
data.tar.gz: 9bdd2815861a6b6a67951ab7bfd91d7818fa874d5b5e6ee0e378b2dbf46baa28ff9eab00c029a641674ee147454d1573e0b538d263000ca5dafdf195811c84ae
|
@@ -3,17 +3,24 @@ module Sidekiq
|
|
3
3
|
module Repeatable
|
4
4
|
module ClassMethods
|
5
5
|
def repeat(&block)
|
6
|
-
@
|
6
|
+
@block = block
|
7
|
+
end
|
8
|
+
|
9
|
+
def cronline
|
10
|
+
return @cronline if @cronline
|
11
|
+
return if @block.nil?
|
12
|
+
@cronline = MiniIceCube::MainDsl.new.instance_eval(&@block).to_s
|
7
13
|
@cronline = CronParser.new(@cronline)
|
14
|
+
|
8
15
|
rescue ArgumentError
|
9
16
|
fail "repeat '#{@cronline}' in class #{self.name} is not a valid cron line"
|
10
17
|
end
|
11
18
|
|
12
19
|
def reschedule
|
13
20
|
# Only if repeat is configured.
|
14
|
-
return unless
|
21
|
+
return unless !!cronline
|
15
22
|
|
16
|
-
ts =
|
23
|
+
ts = cronline.next
|
17
24
|
args = [Time.now.to_f, ts.to_f].take(instance_method(:perform).arity)
|
18
25
|
nj = next_scheduled_job
|
19
26
|
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
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.3
|
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:
|
11
|
+
date: 2017-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '4'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: parse-cron
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +92,20 @@ dependencies:
|
|
86
92
|
- - "~>"
|
87
93
|
- !ruby/object:Gem::Version
|
88
94
|
version: '10.4'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: redis-namespace
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '1.3'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '1.3'
|
89
109
|
description: This gem adds recurring jobs to Sidekiq. It is heavily inspired by the
|
90
110
|
sidekiq-dejavu and sidetiq gems.
|
91
111
|
email: technology@flavoursys.com
|
@@ -120,9 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
140
|
version: '0'
|
121
141
|
requirements: []
|
122
142
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.6.12
|
124
144
|
signing_key:
|
125
145
|
specification_version: 4
|
126
146
|
summary: Repeat is a clockless recurring job system for Sidekiq.
|
127
147
|
test_files: []
|
128
|
-
has_rdoc:
|