sidekiq-unique-jobs 6.0.7 → 7.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1880 -156
- data/README.md +818 -238
- data/bin/uniquejobs +2 -2
- data/lib/sidekiq-unique-jobs.rb +1 -1
- data/lib/sidekiq_unique_jobs/batch_delete.rb +124 -0
- data/lib/sidekiq_unique_jobs/changelog.rb +78 -0
- data/lib/sidekiq_unique_jobs/cli.rb +68 -25
- data/lib/sidekiq_unique_jobs/config.rb +319 -0
- data/lib/sidekiq_unique_jobs/connection.rb +6 -5
- data/lib/sidekiq_unique_jobs/constants.rb +50 -20
- data/lib/sidekiq_unique_jobs/core_ext.rb +80 -0
- data/lib/sidekiq_unique_jobs/deprecation.rb +65 -0
- data/lib/sidekiq_unique_jobs/digests.rb +70 -87
- data/lib/sidekiq_unique_jobs/exceptions.rb +88 -12
- data/lib/sidekiq_unique_jobs/expiring_digests.rb +14 -0
- data/lib/sidekiq_unique_jobs/job.rb +47 -13
- data/lib/sidekiq_unique_jobs/json.rb +47 -0
- data/lib/sidekiq_unique_jobs/key.rb +98 -0
- data/lib/sidekiq_unique_jobs/lock/base_lock.rb +111 -82
- data/lib/sidekiq_unique_jobs/lock/client_validator.rb +28 -0
- data/lib/sidekiq_unique_jobs/lock/server_validator.rb +27 -0
- data/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb +45 -5
- data/lib/sidekiq_unique_jobs/lock/until_executed.rb +30 -4
- data/lib/sidekiq_unique_jobs/lock/until_executing.rb +26 -2
- data/lib/sidekiq_unique_jobs/lock/until_expired.rb +27 -15
- data/lib/sidekiq_unique_jobs/lock/validator.rb +96 -0
- data/lib/sidekiq_unique_jobs/lock/while_executing.rb +26 -7
- data/lib/sidekiq_unique_jobs/lock/while_executing_reject.rb +3 -11
- data/lib/sidekiq_unique_jobs/lock.rb +342 -0
- data/lib/sidekiq_unique_jobs/lock_args.rb +127 -0
- data/lib/sidekiq_unique_jobs/lock_config.rb +126 -0
- data/lib/sidekiq_unique_jobs/lock_digest.rb +79 -0
- data/lib/sidekiq_unique_jobs/lock_info.rb +68 -0
- data/lib/sidekiq_unique_jobs/lock_timeout.rb +62 -0
- data/lib/sidekiq_unique_jobs/lock_ttl.rb +77 -0
- data/lib/sidekiq_unique_jobs/lock_type.rb +37 -0
- data/lib/sidekiq_unique_jobs/locksmith.rb +324 -95
- data/lib/sidekiq_unique_jobs/logging/middleware_context.rb +44 -0
- data/lib/sidekiq_unique_jobs/logging.rb +208 -30
- data/lib/sidekiq_unique_jobs/lua/delete.lua +51 -0
- data/lib/sidekiq_unique_jobs/lua/delete_by_digest.lua +42 -0
- data/lib/sidekiq_unique_jobs/lua/delete_job_by_digest.lua +38 -0
- data/lib/sidekiq_unique_jobs/lua/find_digest_in_queues.lua +26 -0
- data/lib/sidekiq_unique_jobs/lua/lock.lua +99 -0
- data/lib/sidekiq_unique_jobs/lua/lock_until_expired.lua +92 -0
- data/lib/sidekiq_unique_jobs/lua/locked.lua +35 -0
- data/lib/sidekiq_unique_jobs/lua/queue.lua +87 -0
- data/lib/sidekiq_unique_jobs/lua/reap_orphans.lua +122 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_common.lua +40 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_current_time.lua +8 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_delete_from_queue.lua +22 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_delete_from_sorted_set.lua +18 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_find_digest_in_process_set.lua +53 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_find_digest_in_queues.lua +43 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_find_digest_in_sorted_set.lua +24 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_hgetall.lua +13 -0
- data/lib/sidekiq_unique_jobs/lua/shared/_upgrades.lua +3 -0
- data/lib/sidekiq_unique_jobs/lua/unlock.lua +107 -0
- data/lib/sidekiq_unique_jobs/lua/update_version.lua +40 -0
- data/lib/sidekiq_unique_jobs/lua/upgrade.lua +68 -0
- data/lib/sidekiq_unique_jobs/middleware/client.rb +42 -0
- data/lib/sidekiq_unique_jobs/middleware/server.rb +31 -0
- data/lib/sidekiq_unique_jobs/middleware.rb +33 -30
- data/lib/sidekiq_unique_jobs/normalizer.rb +4 -4
- data/lib/sidekiq_unique_jobs/on_conflict/log.rb +9 -5
- data/lib/sidekiq_unique_jobs/on_conflict/null_strategy.rb +1 -1
- data/lib/sidekiq_unique_jobs/on_conflict/raise.rb +2 -2
- data/lib/sidekiq_unique_jobs/on_conflict/reject.rb +63 -17
- data/lib/sidekiq_unique_jobs/on_conflict/replace.rb +54 -14
- data/lib/sidekiq_unique_jobs/on_conflict/reschedule.rb +16 -5
- data/lib/sidekiq_unique_jobs/on_conflict/strategy.rb +26 -7
- data/lib/sidekiq_unique_jobs/on_conflict.rb +34 -16
- data/lib/sidekiq_unique_jobs/options_with_fallback.rb +39 -36
- data/lib/sidekiq_unique_jobs/orphans/lua_reaper.rb +29 -0
- data/lib/sidekiq_unique_jobs/orphans/manager.rb +241 -0
- data/lib/sidekiq_unique_jobs/orphans/null_reaper.rb +24 -0
- data/lib/sidekiq_unique_jobs/orphans/observer.rb +42 -0
- data/lib/sidekiq_unique_jobs/orphans/reaper.rb +114 -0
- data/lib/sidekiq_unique_jobs/orphans/reaper_resurrector.rb +170 -0
- data/lib/sidekiq_unique_jobs/orphans/ruby_reaper.rb +298 -0
- data/lib/sidekiq_unique_jobs/redis/entity.rb +112 -0
- data/lib/sidekiq_unique_jobs/redis/hash.rb +56 -0
- data/lib/sidekiq_unique_jobs/redis/list.rb +32 -0
- data/lib/sidekiq_unique_jobs/redis/set.rb +32 -0
- data/lib/sidekiq_unique_jobs/redis/sorted_set.rb +86 -0
- data/lib/sidekiq_unique_jobs/redis/string.rb +51 -0
- data/lib/sidekiq_unique_jobs/redis.rb +11 -0
- data/lib/sidekiq_unique_jobs/reflectable.rb +26 -0
- data/lib/sidekiq_unique_jobs/reflections.rb +79 -0
- data/lib/sidekiq_unique_jobs/rspec/matchers/have_valid_sidekiq_options.rb +51 -0
- data/lib/sidekiq_unique_jobs/rspec/matchers.rb +26 -0
- data/lib/sidekiq_unique_jobs/script/caller.rb +127 -0
- data/lib/sidekiq_unique_jobs/script.rb +15 -0
- data/lib/sidekiq_unique_jobs/server.rb +61 -0
- data/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb +115 -66
- data/lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb +304 -0
- data/lib/sidekiq_unique_jobs/sidekiq_worker_methods.rb +51 -29
- data/lib/sidekiq_unique_jobs/testing.rb +104 -31
- data/lib/sidekiq_unique_jobs/timer_task.rb +299 -0
- data/lib/sidekiq_unique_jobs/timing.rb +58 -0
- data/lib/sidekiq_unique_jobs/unlockable.rb +20 -4
- data/lib/sidekiq_unique_jobs/update_version.rb +25 -0
- data/lib/sidekiq_unique_jobs/upgrade_locks.rb +155 -0
- data/lib/sidekiq_unique_jobs/version.rb +3 -1
- data/lib/sidekiq_unique_jobs/version_check.rb +114 -0
- data/lib/sidekiq_unique_jobs/web/helpers.rb +140 -15
- data/lib/sidekiq_unique_jobs/web/views/_paging.erb +4 -4
- data/lib/sidekiq_unique_jobs/web/views/changelogs.erb +54 -0
- data/lib/sidekiq_unique_jobs/web/views/lock.erb +110 -0
- data/lib/sidekiq_unique_jobs/web/views/locks.erb +54 -0
- data/lib/sidekiq_unique_jobs/web.rb +86 -29
- data/lib/sidekiq_unique_jobs.rb +78 -105
- data/lib/tasks/changelog.rake +23 -0
- metadata +154 -218
- data/.codeclimate.yml +0 -35
- data/.csslintrc +0 -2
- data/.dockerignore +0 -4
- data/.editorconfig +0 -14
- data/.eslintignore +0 -1
- data/.eslintrc +0 -213
- data/.fasterer.yml +0 -23
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
- data/.gitignore +0 -28
- data/.reek.yml +0 -87
- data/.rspec +0 -2
- data/.rubocop.yml +0 -127
- data/.simplecov +0 -20
- data/.travis.yml +0 -47
- data/.yardopts +0 -7
- data/Appraisals +0 -29
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -24
- data/Guardfile +0 -55
- data/Rakefile +0 -12
- data/_config.yml +0 -1
- data/assets/unique_digests_1.png +0 -0
- data/assets/unique_digests_2.png +0 -0
- data/bin/bench +0 -20
- data/examples/another_unique_job.rb +0 -15
- data/examples/custom_queue_job.rb +0 -12
- data/examples/custom_queue_job_with_filter_method.rb +0 -13
- data/examples/custom_queue_job_with_filter_proc.rb +0 -16
- data/examples/expiring_job.rb +0 -12
- data/examples/inline_worker.rb +0 -12
- data/examples/just_a_worker.rb +0 -13
- data/examples/long_running_job.rb +0 -14
- data/examples/main_job.rb +0 -14
- data/examples/my_job.rb +0 -12
- data/examples/my_unique_job.rb +0 -15
- data/examples/my_unique_job_with_filter_method.rb +0 -21
- data/examples/my_unique_job_with_filter_proc.rb +0 -19
- data/examples/notify_worker.rb +0 -14
- data/examples/plain_class.rb +0 -13
- data/examples/simple_worker.rb +0 -15
- data/examples/spawn_simple_worker.rb +0 -12
- data/examples/test_class.rb +0 -9
- data/examples/unique_across_workers_job.rb +0 -20
- data/examples/unique_job_on_conflict_raise.rb +0 -14
- data/examples/unique_job_on_conflict_reject.rb +0 -14
- data/examples/unique_job_on_conflict_reschedule.rb +0 -14
- data/examples/unique_job_with_conditional_parameter.rb +0 -18
- data/examples/unique_job_with_filter_method.rb +0 -21
- data/examples/unique_job_with_nil_unique_args.rb +0 -20
- data/examples/unique_job_with_no_unique_args_method.rb +0 -16
- data/examples/unique_job_withthout_unique_args_parameter.rb +0 -18
- data/examples/unique_on_all_queues_job.rb +0 -16
- data/examples/until_and_while_executing_job.rb +0 -17
- data/examples/until_executed_2_job.rb +0 -24
- data/examples/until_executed_job.rb +0 -25
- data/examples/until_executing_job.rb +0 -11
- data/examples/until_expired_job.rb +0 -12
- data/examples/until_global_expired_job.rb +0 -12
- data/examples/while_executing_job.rb +0 -15
- data/examples/while_executing_reject_job.rb +0 -14
- data/examples/without_argument_job.rb +0 -13
- data/lib/sidekiq_unique_jobs/client/middleware.rb +0 -56
- data/lib/sidekiq_unique_jobs/scripts.rb +0 -89
- data/lib/sidekiq_unique_jobs/server/middleware.rb +0 -40
- data/lib/sidekiq_unique_jobs/timeout/calculator.rb +0 -63
- data/lib/sidekiq_unique_jobs/timeout.rb +0 -8
- data/lib/sidekiq_unique_jobs/unique_args.rb +0 -149
- data/lib/sidekiq_unique_jobs/util.rb +0 -103
- data/lib/sidekiq_unique_jobs/web/views/unique_digest.erb +0 -28
- data/lib/sidekiq_unique_jobs/web/views/unique_digests.erb +0 -42
- data/redis/acquire_lock.lua +0 -21
- data/redis/delete.lua +0 -14
- data/redis/delete_by_digest.lua +0 -24
- data/redis/delete_job_by_digest.lua +0 -60
- data/redis/lock.lua +0 -58
- data/redis/release_stale_locks.lua +0 -90
- data/redis/unlock.lua +0 -32
- data/sidekiq-unique-jobs.gemspec +0 -42
metadata
CHANGED
@@ -1,289 +1,184 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-unique-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.1.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: brpoplpush-redis_script
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "
|
19
|
+
version: 0.1.1
|
20
|
+
- - "<="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 2.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "
|
29
|
+
version: 0.1.1
|
30
|
+
- - "<="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 2.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: concurrent-ruby
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '4.0'
|
40
|
-
- - "<"
|
37
|
+
- - "~>"
|
41
38
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
43
|
-
type: :runtime
|
44
|
-
prerelease: false
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
39
|
+
version: '1.0'
|
47
40
|
- - ">="
|
48
41
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
50
|
-
- - "<"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '6.0'
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: thor
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '0'
|
42
|
+
version: 1.0.5
|
60
43
|
type: :runtime
|
61
44
|
prerelease: false
|
62
45
|
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - "~>"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '0'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: bundler
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '1.16'
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '1.16'
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: rspec
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '3.7'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '3.7'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: rake
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '12.3'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '12.3'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: timecop
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '0.9'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '0.9'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: yard
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '0.9'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '0.9'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: gem-release
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
46
|
requirements:
|
141
47
|
- - "~>"
|
142
48
|
- !ruby/object:Gem::Version
|
143
49
|
version: '1.0'
|
144
|
-
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - "~>"
|
50
|
+
- - ">="
|
149
51
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
52
|
+
version: 1.0.5
|
151
53
|
- !ruby/object:Gem::Dependency
|
152
|
-
name:
|
54
|
+
name: redis
|
153
55
|
requirement: !ruby/object:Gem::Requirement
|
154
56
|
requirements:
|
155
|
-
- - "
|
57
|
+
- - "<"
|
156
58
|
- !ruby/object:Gem::Version
|
157
|
-
version: '
|
158
|
-
type: :
|
59
|
+
version: '5.0'
|
60
|
+
type: :runtime
|
159
61
|
prerelease: false
|
160
62
|
version_requirements: !ruby/object:Gem::Requirement
|
161
63
|
requirements:
|
162
|
-
- - "
|
64
|
+
- - "<"
|
163
65
|
- !ruby/object:Gem::Version
|
164
|
-
version: '
|
66
|
+
version: '5.0'
|
165
67
|
- !ruby/object:Gem::Dependency
|
166
|
-
name:
|
68
|
+
name: sidekiq
|
167
69
|
requirement: !ruby/object:Gem::Requirement
|
168
70
|
requirements:
|
169
71
|
- - ">="
|
170
72
|
- !ruby/object:Gem::Version
|
171
|
-
version: '0'
|
172
|
-
|
73
|
+
version: '5.0'
|
74
|
+
- - "<"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '7.0'
|
77
|
+
type: :runtime
|
173
78
|
prerelease: false
|
174
79
|
version_requirements: !ruby/object:Gem::Requirement
|
175
80
|
requirements:
|
176
81
|
- - ">="
|
177
82
|
- !ruby/object:Gem::Version
|
178
|
-
version: '0'
|
83
|
+
version: '5.0'
|
84
|
+
- - "<"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '7.0'
|
179
87
|
- !ruby/object:Gem::Dependency
|
180
|
-
name:
|
88
|
+
name: thor
|
181
89
|
requirement: !ruby/object:Gem::Requirement
|
182
90
|
requirements:
|
183
91
|
- - ">="
|
184
92
|
- !ruby/object:Gem::Version
|
185
|
-
version: '0'
|
186
|
-
|
93
|
+
version: '0.20'
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
type: :runtime
|
187
98
|
prerelease: false
|
188
99
|
version_requirements: !ruby/object:Gem::Requirement
|
189
100
|
requirements:
|
190
101
|
- - ">="
|
191
102
|
- !ruby/object:Gem::Version
|
192
|
-
version: '0'
|
193
|
-
|
103
|
+
version: '0.20'
|
104
|
+
- - "<"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '3.0'
|
107
|
+
description: |
|
108
|
+
Prevents simultaneous Sidekiq jobs with the same unique arguments to run.
|
109
|
+
Highly configurable to suite your specific needs.
|
194
110
|
email:
|
195
|
-
- mikael@
|
111
|
+
- mikael@mhenrixon.com
|
196
112
|
executables:
|
197
113
|
- uniquejobs
|
198
114
|
extensions: []
|
199
115
|
extra_rdoc_files: []
|
200
116
|
files:
|
201
|
-
- ".codeclimate.yml"
|
202
|
-
- ".csslintrc"
|
203
|
-
- ".dockerignore"
|
204
|
-
- ".editorconfig"
|
205
|
-
- ".eslintignore"
|
206
|
-
- ".eslintrc"
|
207
|
-
- ".fasterer.yml"
|
208
|
-
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
209
|
-
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
210
|
-
- ".gitignore"
|
211
|
-
- ".reek.yml"
|
212
|
-
- ".rspec"
|
213
|
-
- ".rubocop.yml"
|
214
|
-
- ".simplecov"
|
215
|
-
- ".travis.yml"
|
216
|
-
- ".yardopts"
|
217
|
-
- Appraisals
|
218
117
|
- CHANGELOG.md
|
219
|
-
- CODE_OF_CONDUCT.md
|
220
|
-
- Gemfile
|
221
|
-
- Guardfile
|
222
118
|
- LICENSE.txt
|
223
119
|
- README.md
|
224
|
-
- Rakefile
|
225
|
-
- _config.yml
|
226
|
-
- assets/unique_digests_1.png
|
227
|
-
- assets/unique_digests_2.png
|
228
|
-
- bin/bench
|
229
120
|
- bin/uniquejobs
|
230
|
-
- examples/another_unique_job.rb
|
231
|
-
- examples/custom_queue_job.rb
|
232
|
-
- examples/custom_queue_job_with_filter_method.rb
|
233
|
-
- examples/custom_queue_job_with_filter_proc.rb
|
234
|
-
- examples/expiring_job.rb
|
235
|
-
- examples/inline_worker.rb
|
236
|
-
- examples/just_a_worker.rb
|
237
|
-
- examples/long_running_job.rb
|
238
|
-
- examples/main_job.rb
|
239
|
-
- examples/my_job.rb
|
240
|
-
- examples/my_unique_job.rb
|
241
|
-
- examples/my_unique_job_with_filter_method.rb
|
242
|
-
- examples/my_unique_job_with_filter_proc.rb
|
243
|
-
- examples/notify_worker.rb
|
244
|
-
- examples/plain_class.rb
|
245
|
-
- examples/simple_worker.rb
|
246
|
-
- examples/spawn_simple_worker.rb
|
247
|
-
- examples/test_class.rb
|
248
|
-
- examples/unique_across_workers_job.rb
|
249
|
-
- examples/unique_job_on_conflict_raise.rb
|
250
|
-
- examples/unique_job_on_conflict_reject.rb
|
251
|
-
- examples/unique_job_on_conflict_reschedule.rb
|
252
|
-
- examples/unique_job_with_conditional_parameter.rb
|
253
|
-
- examples/unique_job_with_filter_method.rb
|
254
|
-
- examples/unique_job_with_nil_unique_args.rb
|
255
|
-
- examples/unique_job_with_no_unique_args_method.rb
|
256
|
-
- examples/unique_job_withthout_unique_args_parameter.rb
|
257
|
-
- examples/unique_on_all_queues_job.rb
|
258
|
-
- examples/until_and_while_executing_job.rb
|
259
|
-
- examples/until_executed_2_job.rb
|
260
|
-
- examples/until_executed_job.rb
|
261
|
-
- examples/until_executing_job.rb
|
262
|
-
- examples/until_expired_job.rb
|
263
|
-
- examples/until_global_expired_job.rb
|
264
|
-
- examples/while_executing_job.rb
|
265
|
-
- examples/while_executing_reject_job.rb
|
266
|
-
- examples/without_argument_job.rb
|
267
121
|
- lib/sidekiq-unique-jobs.rb
|
268
122
|
- lib/sidekiq_unique_jobs.rb
|
123
|
+
- lib/sidekiq_unique_jobs/batch_delete.rb
|
124
|
+
- lib/sidekiq_unique_jobs/changelog.rb
|
269
125
|
- lib/sidekiq_unique_jobs/cli.rb
|
270
|
-
- lib/sidekiq_unique_jobs/
|
126
|
+
- lib/sidekiq_unique_jobs/config.rb
|
271
127
|
- lib/sidekiq_unique_jobs/connection.rb
|
272
128
|
- lib/sidekiq_unique_jobs/constants.rb
|
273
129
|
- lib/sidekiq_unique_jobs/core_ext.rb
|
130
|
+
- lib/sidekiq_unique_jobs/deprecation.rb
|
274
131
|
- lib/sidekiq_unique_jobs/digests.rb
|
275
132
|
- lib/sidekiq_unique_jobs/exceptions.rb
|
133
|
+
- lib/sidekiq_unique_jobs/expiring_digests.rb
|
276
134
|
- lib/sidekiq_unique_jobs/job.rb
|
135
|
+
- lib/sidekiq_unique_jobs/json.rb
|
136
|
+
- lib/sidekiq_unique_jobs/key.rb
|
137
|
+
- lib/sidekiq_unique_jobs/lock.rb
|
277
138
|
- lib/sidekiq_unique_jobs/lock/base_lock.rb
|
139
|
+
- lib/sidekiq_unique_jobs/lock/client_validator.rb
|
140
|
+
- lib/sidekiq_unique_jobs/lock/server_validator.rb
|
278
141
|
- lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
|
279
142
|
- lib/sidekiq_unique_jobs/lock/until_executed.rb
|
280
143
|
- lib/sidekiq_unique_jobs/lock/until_executing.rb
|
281
144
|
- lib/sidekiq_unique_jobs/lock/until_expired.rb
|
145
|
+
- lib/sidekiq_unique_jobs/lock/validator.rb
|
282
146
|
- lib/sidekiq_unique_jobs/lock/while_executing.rb
|
283
147
|
- lib/sidekiq_unique_jobs/lock/while_executing_reject.rb
|
148
|
+
- lib/sidekiq_unique_jobs/lock_args.rb
|
149
|
+
- lib/sidekiq_unique_jobs/lock_config.rb
|
150
|
+
- lib/sidekiq_unique_jobs/lock_digest.rb
|
151
|
+
- lib/sidekiq_unique_jobs/lock_info.rb
|
152
|
+
- lib/sidekiq_unique_jobs/lock_timeout.rb
|
153
|
+
- lib/sidekiq_unique_jobs/lock_ttl.rb
|
154
|
+
- lib/sidekiq_unique_jobs/lock_type.rb
|
284
155
|
- lib/sidekiq_unique_jobs/locksmith.rb
|
285
156
|
- lib/sidekiq_unique_jobs/logging.rb
|
157
|
+
- lib/sidekiq_unique_jobs/logging/middleware_context.rb
|
158
|
+
- lib/sidekiq_unique_jobs/lua/delete.lua
|
159
|
+
- lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
|
160
|
+
- lib/sidekiq_unique_jobs/lua/delete_job_by_digest.lua
|
161
|
+
- lib/sidekiq_unique_jobs/lua/find_digest_in_queues.lua
|
162
|
+
- lib/sidekiq_unique_jobs/lua/lock.lua
|
163
|
+
- lib/sidekiq_unique_jobs/lua/lock_until_expired.lua
|
164
|
+
- lib/sidekiq_unique_jobs/lua/locked.lua
|
165
|
+
- lib/sidekiq_unique_jobs/lua/queue.lua
|
166
|
+
- lib/sidekiq_unique_jobs/lua/reap_orphans.lua
|
167
|
+
- lib/sidekiq_unique_jobs/lua/shared/_common.lua
|
168
|
+
- lib/sidekiq_unique_jobs/lua/shared/_current_time.lua
|
169
|
+
- lib/sidekiq_unique_jobs/lua/shared/_delete_from_queue.lua
|
170
|
+
- lib/sidekiq_unique_jobs/lua/shared/_delete_from_sorted_set.lua
|
171
|
+
- lib/sidekiq_unique_jobs/lua/shared/_find_digest_in_process_set.lua
|
172
|
+
- lib/sidekiq_unique_jobs/lua/shared/_find_digest_in_queues.lua
|
173
|
+
- lib/sidekiq_unique_jobs/lua/shared/_find_digest_in_sorted_set.lua
|
174
|
+
- lib/sidekiq_unique_jobs/lua/shared/_hgetall.lua
|
175
|
+
- lib/sidekiq_unique_jobs/lua/shared/_upgrades.lua
|
176
|
+
- lib/sidekiq_unique_jobs/lua/unlock.lua
|
177
|
+
- lib/sidekiq_unique_jobs/lua/update_version.lua
|
178
|
+
- lib/sidekiq_unique_jobs/lua/upgrade.lua
|
286
179
|
- lib/sidekiq_unique_jobs/middleware.rb
|
180
|
+
- lib/sidekiq_unique_jobs/middleware/client.rb
|
181
|
+
- lib/sidekiq_unique_jobs/middleware/server.rb
|
287
182
|
- lib/sidekiq_unique_jobs/normalizer.rb
|
288
183
|
- lib/sidekiq_unique_jobs/on_conflict.rb
|
289
184
|
- lib/sidekiq_unique_jobs/on_conflict/log.rb
|
@@ -294,35 +189,77 @@ files:
|
|
294
189
|
- lib/sidekiq_unique_jobs/on_conflict/reschedule.rb
|
295
190
|
- lib/sidekiq_unique_jobs/on_conflict/strategy.rb
|
296
191
|
- lib/sidekiq_unique_jobs/options_with_fallback.rb
|
297
|
-
- lib/sidekiq_unique_jobs/
|
298
|
-
- lib/sidekiq_unique_jobs/
|
192
|
+
- lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
|
193
|
+
- lib/sidekiq_unique_jobs/orphans/manager.rb
|
194
|
+
- lib/sidekiq_unique_jobs/orphans/null_reaper.rb
|
195
|
+
- lib/sidekiq_unique_jobs/orphans/observer.rb
|
196
|
+
- lib/sidekiq_unique_jobs/orphans/reaper.rb
|
197
|
+
- lib/sidekiq_unique_jobs/orphans/reaper_resurrector.rb
|
198
|
+
- lib/sidekiq_unique_jobs/orphans/ruby_reaper.rb
|
199
|
+
- lib/sidekiq_unique_jobs/redis.rb
|
200
|
+
- lib/sidekiq_unique_jobs/redis/entity.rb
|
201
|
+
- lib/sidekiq_unique_jobs/redis/hash.rb
|
202
|
+
- lib/sidekiq_unique_jobs/redis/list.rb
|
203
|
+
- lib/sidekiq_unique_jobs/redis/set.rb
|
204
|
+
- lib/sidekiq_unique_jobs/redis/sorted_set.rb
|
205
|
+
- lib/sidekiq_unique_jobs/redis/string.rb
|
206
|
+
- lib/sidekiq_unique_jobs/reflectable.rb
|
207
|
+
- lib/sidekiq_unique_jobs/reflections.rb
|
208
|
+
- lib/sidekiq_unique_jobs/rspec/matchers.rb
|
209
|
+
- lib/sidekiq_unique_jobs/rspec/matchers/have_valid_sidekiq_options.rb
|
210
|
+
- lib/sidekiq_unique_jobs/script.rb
|
211
|
+
- lib/sidekiq_unique_jobs/script/caller.rb
|
212
|
+
- lib/sidekiq_unique_jobs/server.rb
|
299
213
|
- lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb
|
214
|
+
- lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb
|
300
215
|
- lib/sidekiq_unique_jobs/sidekiq_worker_methods.rb
|
301
216
|
- lib/sidekiq_unique_jobs/testing.rb
|
302
|
-
- lib/sidekiq_unique_jobs/
|
303
|
-
- lib/sidekiq_unique_jobs/
|
304
|
-
- lib/sidekiq_unique_jobs/unique_args.rb
|
217
|
+
- lib/sidekiq_unique_jobs/timer_task.rb
|
218
|
+
- lib/sidekiq_unique_jobs/timing.rb
|
305
219
|
- lib/sidekiq_unique_jobs/unlockable.rb
|
306
|
-
- lib/sidekiq_unique_jobs/
|
220
|
+
- lib/sidekiq_unique_jobs/update_version.rb
|
221
|
+
- lib/sidekiq_unique_jobs/upgrade_locks.rb
|
307
222
|
- lib/sidekiq_unique_jobs/version.rb
|
223
|
+
- lib/sidekiq_unique_jobs/version_check.rb
|
308
224
|
- lib/sidekiq_unique_jobs/web.rb
|
309
225
|
- lib/sidekiq_unique_jobs/web/helpers.rb
|
310
226
|
- lib/sidekiq_unique_jobs/web/views/_paging.erb
|
311
|
-
- lib/sidekiq_unique_jobs/web/views/
|
312
|
-
- lib/sidekiq_unique_jobs/web/views/
|
313
|
-
-
|
314
|
-
-
|
315
|
-
- redis/delete_by_digest.lua
|
316
|
-
- redis/delete_job_by_digest.lua
|
317
|
-
- redis/lock.lua
|
318
|
-
- redis/release_stale_locks.lua
|
319
|
-
- redis/unlock.lua
|
320
|
-
- sidekiq-unique-jobs.gemspec
|
227
|
+
- lib/sidekiq_unique_jobs/web/views/changelogs.erb
|
228
|
+
- lib/sidekiq_unique_jobs/web/views/lock.erb
|
229
|
+
- lib/sidekiq_unique_jobs/web/views/locks.erb
|
230
|
+
- lib/tasks/changelog.rake
|
321
231
|
homepage: https://github.com/mhenrixon/sidekiq-unique-jobs
|
322
232
|
licenses:
|
323
233
|
- MIT
|
324
|
-
metadata:
|
325
|
-
|
234
|
+
metadata:
|
235
|
+
rubygems_mfa_required: 'true'
|
236
|
+
post_install_message: |
|
237
|
+
IMPORTANT!
|
238
|
+
|
239
|
+
Automatic configuration of the sidekiq middleware is no longer done.
|
240
|
+
Please see: https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/README.md#add-the-middleware
|
241
|
+
|
242
|
+
This version deprecated the following sidekiq_options
|
243
|
+
|
244
|
+
- sidekiq_options lock_args: :method_name
|
245
|
+
|
246
|
+
It is now configured with:
|
247
|
+
|
248
|
+
- sidekiq_options lock_args_method: :method_name
|
249
|
+
|
250
|
+
This is also true for `Sidekiq.default_worker_options`
|
251
|
+
|
252
|
+
We also deprecated the global configuration options:
|
253
|
+
- default_lock_ttl
|
254
|
+
- default_lock_ttl=
|
255
|
+
- default_lock_timeout
|
256
|
+
- default_lock_timeout=
|
257
|
+
|
258
|
+
The new methods to use are:
|
259
|
+
- lock_ttl
|
260
|
+
- lock_ttl=
|
261
|
+
- lock_timeout
|
262
|
+
- lock_timeout=
|
326
263
|
rdoc_options: []
|
327
264
|
require_paths:
|
328
265
|
- lib
|
@@ -330,16 +267,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
330
267
|
requirements:
|
331
268
|
- - ">="
|
332
269
|
- !ruby/object:Gem::Version
|
333
|
-
version: '
|
270
|
+
version: '2.5'
|
334
271
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
335
272
|
requirements:
|
336
273
|
- - ">="
|
337
274
|
- !ruby/object:Gem::Version
|
338
275
|
version: '0'
|
339
276
|
requirements: []
|
340
|
-
|
341
|
-
|
342
|
-
signing_key:
|
277
|
+
rubygems_version: 3.5.6
|
278
|
+
signing_key:
|
343
279
|
specification_version: 4
|
344
|
-
summary:
|
280
|
+
summary: Sidekiq middleware that prevents duplicates jobs
|
345
281
|
test_files: []
|
data/.codeclimate.yml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
---
|
2
|
-
version: '2'
|
3
|
-
plugins:
|
4
|
-
bundler-audit:
|
5
|
-
enabled: false
|
6
|
-
duplication:
|
7
|
-
enabled: true
|
8
|
-
config:
|
9
|
-
languages:
|
10
|
-
- ruby
|
11
|
-
flog:
|
12
|
-
enabled: true
|
13
|
-
fixme:
|
14
|
-
enabled: true
|
15
|
-
markdownlint:
|
16
|
-
enabled: true
|
17
|
-
reek:
|
18
|
-
enabled: true
|
19
|
-
config:
|
20
|
-
file: .reek.yml
|
21
|
-
rubocop:
|
22
|
-
enabled: true
|
23
|
-
channel: rubocop-0-57
|
24
|
-
config:
|
25
|
-
file: .rubocop.yml
|
26
|
-
exclude_patterns:
|
27
|
-
- Gemfile
|
28
|
-
- "*.gemspec"
|
29
|
-
- Appraisals
|
30
|
-
- spec/**/*.rb
|
31
|
-
- gemfiles/**/*
|
32
|
-
- rails_example/**/*
|
33
|
-
- redis/**/*
|
34
|
-
- tmp/**/*
|
35
|
-
|
data/.csslintrc
DELETED
data/.dockerignore
DELETED
data/.editorconfig
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# This file is for unifying the coding style for different editors and IDEs
|
2
|
-
# editorconfig.org
|
3
|
-
|
4
|
-
root = true
|
5
|
-
|
6
|
-
[*]
|
7
|
-
charset = utf-8
|
8
|
-
trim_trailing_whitespace = true
|
9
|
-
insert_final_newline = true
|
10
|
-
indent_style = space
|
11
|
-
indent_size = 2
|
12
|
-
|
13
|
-
[*.{md,slim,haml}]
|
14
|
-
trim_trailing_whitespace = false
|
data/.eslintignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
**/*{.,-}min.js
|