sidekiq-middleware 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES.md +5 -0
- data/README.md +1 -1
- data/lib/sidekiq-middleware/client/unique_jobs.rb +3 -2
- data/lib/sidekiq-middleware/version.rb +1 -1
- metadata +3 -3
data/CHANGES.md
CHANGED
data/README.md
CHANGED
|
@@ -38,7 +38,7 @@ class UniqueWorker
|
|
|
38
38
|
unique: :all,
|
|
39
39
|
|
|
40
40
|
# Unique expiration (optional, default is 30 minutes)
|
|
41
|
-
# For scheduled jobs calculates automatically
|
|
41
|
+
# For scheduled jobs calculates automatically based on schedule time and expiration period
|
|
42
42
|
expiration: 24 * 60 * 60
|
|
43
43
|
})
|
|
44
44
|
|
|
@@ -13,8 +13,9 @@ module Sidekiq
|
|
|
13
13
|
|
|
14
14
|
# Enabled unique scheduled
|
|
15
15
|
if enabled == :all && payload.has_key?('at')
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
# Use expiration period as specified in configuration,
|
|
17
|
+
# but relative to job schedule time
|
|
18
|
+
expiration += (payload['at'].to_i - Time.now.to_i)
|
|
18
19
|
payload.delete('at')
|
|
19
20
|
end
|
|
20
21
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sidekiq-middleware
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -98,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
98
98
|
version: '0'
|
|
99
99
|
segments:
|
|
100
100
|
- 0
|
|
101
|
-
hash:
|
|
101
|
+
hash: -293936533653775509
|
|
102
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
none: false
|
|
104
104
|
requirements:
|
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
107
|
version: '0'
|
|
108
108
|
segments:
|
|
109
109
|
- 0
|
|
110
|
-
hash:
|
|
110
|
+
hash: -293936533653775509
|
|
111
111
|
requirements: []
|
|
112
112
|
rubyforge_project:
|
|
113
113
|
rubygems_version: 1.8.24
|