sidekiq-unique-jobs 7.0.6 → 7.0.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sidekiq-unique-jobs might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -4
- data/lib/sidekiq_unique_jobs/changelog.rb +2 -2
- data/lib/sidekiq_unique_jobs/digests.rb +2 -2
- data/lib/sidekiq_unique_jobs/version.rb +1 -1
- data/lib/sidekiq_unique_jobs/web.rb +11 -4
- data/lib/sidekiq_unique_jobs/web/helpers.rb +5 -5
- data/lib/sidekiq_unique_jobs/web/views/_paging.erb +4 -4
- data/lib/sidekiq_unique_jobs/web/views/changelogs.erb +1 -1
- data/lib/sidekiq_unique_jobs/web/views/locks.erb +17 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 481e40d622fd6b93108784749fcbb27ece9243ad6d375562666ab783245194a1
|
4
|
+
data.tar.gz: da1a60f10e0b6259f37e42fd7b59927fa3fd15506d2a193329726c5797a93211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7547df950b2b0bbd7b11de1ad53887f011a398198b99f77bde41bc09cd174b5df7d0aee2f894fbdad39b758d6ec117d9ec5837789731f6cab630a196a16c7388
|
7
|
+
data.tar.gz: 6996d1d36543e925ee667ca19fb50bd429d0fb54ea74ac49b9e53de91f63c6e5066d0df8d224f25ceb41d2bfe06413a0dde42b97e2b49cc0896b4207f6ca3e7b
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v7.0.6](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.6) (2021-03-19)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.5...
|
5
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.5...v7.0.6)
|
6
6
|
|
7
7
|
**Fixed bugs:**
|
8
8
|
|
9
9
|
- Deprecation warning for redis behaviour change in 5.0 [\#579](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/579)
|
10
|
+
- Consider a match only when both values present [\#586](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/586) ([mhenrixon](https://github.com/mhenrixon))
|
11
|
+
|
12
|
+
**Closed issues:**
|
13
|
+
|
14
|
+
- Reaper: undefined method `delete\_suffix' for nil:NilClass [\#585](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/585)
|
10
15
|
|
11
16
|
## [v7.0.5](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.5) (2021-03-18)
|
12
17
|
|
@@ -50,6 +55,10 @@
|
|
50
55
|
|
51
56
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.1...v7.0.2)
|
52
57
|
|
58
|
+
**Implemented enhancements:**
|
59
|
+
|
60
|
+
- Give user full control over adding middleware [\#566](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/566) ([mhenrixon](https://github.com/mhenrixon))
|
61
|
+
|
53
62
|
**Fixed bugs:**
|
54
63
|
|
55
64
|
- Lock not getting properly cleared for some jobs [\#560](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/560)
|
@@ -200,6 +209,10 @@
|
|
200
209
|
|
201
210
|
- ConnectionPool::TimeoutError and :until\_executed [\#535](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/535)
|
202
211
|
|
212
|
+
**Merged pull requests:**
|
213
|
+
|
214
|
+
- Support apartment [\#540](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/540) ([mhenrixon](https://github.com/mhenrixon))
|
215
|
+
|
203
216
|
## [v7.0.0.beta24](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta24) (2020-09-27)
|
204
217
|
|
205
218
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta23...v7.0.0.beta24)
|
@@ -382,6 +395,10 @@
|
|
382
395
|
- Please keep some recent versions on rubygems.org [\#478](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/478)
|
383
396
|
- validate\_worker! throws error [\#466](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/466)
|
384
397
|
|
398
|
+
**Merged pull requests:**
|
399
|
+
|
400
|
+
- Allow v7 configuration to work [\#479](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/479) ([mhenrixon](https://github.com/mhenrixon))
|
401
|
+
|
385
402
|
## [v7.0.0.beta11](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta11) (2020-03-21)
|
386
403
|
|
387
404
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta10...v7.0.0.beta11)
|
@@ -417,6 +434,7 @@
|
|
417
434
|
|
418
435
|
**Fixed bugs:**
|
419
436
|
|
437
|
+
- Use thread-safe digest creation mechanism [\#484](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/484) ([mhenrixon](https://github.com/mhenrixon))
|
420
438
|
- Fix access to lock [\#476](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/476) ([mhenrixon](https://github.com/mhenrixon))
|
421
439
|
- Backport v7 fix for conflicts [\#461](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/461) ([mhenrixon](https://github.com/mhenrixon))
|
422
440
|
|
@@ -664,6 +682,7 @@
|
|
664
682
|
- Version 6: lets you schedule job with missing arguments [\#351](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/351)
|
665
683
|
- Version 6 Ignores Jobs Enqueued in Version 5 [\#345](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/345)
|
666
684
|
- Job will not enqueue even with no existing match [\#342](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/342)
|
685
|
+
- Convert v5 locks when needed [\#375](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/375) ([mhenrixon](https://github.com/mhenrixon))
|
667
686
|
|
668
687
|
**Closed issues:**
|
669
688
|
|
@@ -870,6 +889,7 @@
|
|
870
889
|
- Sidekiq web [\#297](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/297) ([mhenrixon](https://github.com/mhenrixon))
|
871
890
|
- Document code [\#296](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/296) ([mhenrixon](https://github.com/mhenrixon))
|
872
891
|
- Rename to `unique:` to `lock:` [\#295](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/295) ([mhenrixon](https://github.com/mhenrixon))
|
892
|
+
- Only unlock not delete [\#285](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/285) ([mhenrixon](https://github.com/mhenrixon))
|
873
893
|
|
874
894
|
**Closed issues:**
|
875
895
|
|
@@ -913,7 +933,6 @@
|
|
913
933
|
**Implemented enhancements:**
|
914
934
|
|
915
935
|
- Prepare for v6 [\#286](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/286) ([mhenrixon](https://github.com/mhenrixon))
|
916
|
-
- Only unlock not delete [\#285](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/285) ([mhenrixon](https://github.com/mhenrixon))
|
917
936
|
|
918
937
|
## [v6.0.0.rc3](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.0.rc3) (2018-06-29)
|
919
938
|
|
@@ -1014,7 +1033,6 @@
|
|
1014
1033
|
- Remove unnecessary monkey patches for String [\#262](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/262) ([zormandi](https://github.com/zormandi))
|
1015
1034
|
- README \> While Executing: remove unnecessary word [\#260](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/260) ([TimCannady](https://github.com/TimCannady))
|
1016
1035
|
- Don't skip monkeypatches if ActiveSupport present [\#248](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/248) ([dleavitt](https://github.com/dleavitt))
|
1017
|
-
- Better runtime locks [\#241](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/241) ([mhenrixon](https://github.com/mhenrixon))
|
1018
1036
|
|
1019
1037
|
## [v5.0.10](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v5.0.10) (2017-08-19)
|
1020
1038
|
|
@@ -1042,6 +1060,7 @@
|
|
1042
1060
|
|
1043
1061
|
**Merged pull requests:**
|
1044
1062
|
|
1063
|
+
- Better runtime locks [\#241](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/241) ([mhenrixon](https://github.com/mhenrixon))
|
1045
1064
|
- Your testing lib is broken and don't permit to test uniqueness of jobs [\#232](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/232) ([keysen](https://github.com/keysen))
|
1046
1065
|
- Use hscan for Util\#expire [\#229](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/229) ([dmkc](https://github.com/dmkc))
|
1047
1066
|
- Fixed documentation example about unique\_args [\#228](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/228) ([andresakata](https://github.com/andresakata))
|
@@ -19,8 +19,11 @@ module SidekiqUniqueJobs
|
|
19
19
|
@count = (params[:count] || 100).to_i
|
20
20
|
@current_cursor = params[:cursor]
|
21
21
|
@prev_cursor = params[:prev_cursor]
|
22
|
-
@
|
23
|
-
|
22
|
+
@total_size, @next_cursor, @changelogs = changelog.page(
|
23
|
+
cursor: @current_cursor,
|
24
|
+
pattern: @filter,
|
25
|
+
page_size: @count,
|
26
|
+
)
|
24
27
|
|
25
28
|
erb(unique_template(:changelogs))
|
26
29
|
end
|
@@ -36,8 +39,12 @@ module SidekiqUniqueJobs
|
|
36
39
|
@count = (params[:count] || 100).to_i
|
37
40
|
@current_cursor = params[:cursor]
|
38
41
|
@prev_cursor = params[:prev_cursor]
|
39
|
-
|
40
|
-
@total_size, @next_cursor, @locks = digests.page(
|
42
|
+
|
43
|
+
@total_size, @next_cursor, @locks = digests.page(
|
44
|
+
cursor: @current_cursor,
|
45
|
+
pattern: @filter,
|
46
|
+
page_size: @count,
|
47
|
+
)
|
41
48
|
|
42
49
|
erb(unique_template(:locks))
|
43
50
|
end
|
@@ -13,7 +13,9 @@ module SidekiqUniqueJobs
|
|
13
13
|
VIEW_PATH = File.expand_path("../web/views", __dir__).freeze
|
14
14
|
#
|
15
15
|
# @return [Array<String>] safe params
|
16
|
-
SAFE_CPARAMS = %w[
|
16
|
+
SAFE_CPARAMS = %w[
|
17
|
+
filter count cursor prev_cursor poll direction
|
18
|
+
].freeze
|
17
19
|
|
18
20
|
extend self
|
19
21
|
|
@@ -67,10 +69,8 @@ module SidekiqUniqueJobs
|
|
67
69
|
# @return [String] a url safe parameter string
|
68
70
|
#
|
69
71
|
def cparams(options)
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
params.merge(options).map do |key, value|
|
72
|
+
stringified_options = options.transform_keys(&:to_s)
|
73
|
+
params.merge(stringified_options).map do |key, value|
|
74
74
|
next unless SAFE_CPARAMS.include?(key)
|
75
75
|
|
76
76
|
"#{key}=#{CGI.escape(value.to_s)}"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<ul class="pagination pull-right flip">
|
2
2
|
<% if @prev_cursor %>
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
<li>
|
4
|
+
<a href="<%= url %>?<%= cparams(filter: @filter, cursor: @prev_cursor, prev_cursor: @next_cursor) %>">Previous <%= @count %></a>
|
5
|
+
</li>
|
6
6
|
<% end %>
|
7
7
|
<li>
|
8
|
-
<a href="<%= url %>?<%= cparams(cursor: @next_cursor, prev_cursor: @current_cursor) %>">Next <%= @count %></a>
|
8
|
+
<a href="<%= url %>?<%= cparams(filter: @filter, cursor: @next_cursor, prev_cursor: @current_cursor) %>">Next <%= @count %></a>
|
9
9
|
</li>
|
10
10
|
</ul>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<%= t('Filter') %>
|
12
12
|
</button>
|
13
13
|
</form>
|
14
|
-
<% if @locks.any? && @total_size > @count
|
14
|
+
<% if @locks.any? && @total_size > @count %>
|
15
15
|
<div class="col-sm-4">
|
16
16
|
<%= erb unique_template(:_paging), locals: { url: "#{root_path}locks" } %>
|
17
17
|
</div>
|
@@ -30,20 +30,22 @@
|
|
30
30
|
</tr>
|
31
31
|
</thead>
|
32
32
|
<% @locks.each do |lock| %>
|
33
|
-
<
|
34
|
-
<
|
35
|
-
<
|
36
|
-
<%=
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
33
|
+
<tbody>
|
34
|
+
<tr class="lock-row">
|
35
|
+
<td>
|
36
|
+
<form action="<%= root_path %>locks/<%= lock.key %>/delete" method="get">
|
37
|
+
<%= csrf_tag %>
|
38
|
+
<input name="lock" value="<%= h lock.key %>" type="hidden" />
|
39
|
+
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
|
40
|
+
</form>
|
41
|
+
</td>
|
42
|
+
<td><a href="<%= root_path %>locks/<%= lock.key %>"><%= lock.key %></a></td>
|
43
|
+
<td><%= lock.info["lock"] %></td>
|
44
|
+
<td><%= lock.locked.count %></td>
|
45
|
+
<td><%= safe_relative_time(lock.created_at) %></td>
|
46
|
+
</tr>
|
47
|
+
</tbody>
|
48
|
+
<% end %>
|
47
49
|
</table>
|
48
50
|
<form action="<%= root_path %>locks/delete_all" method="get">
|
49
51
|
<input class="btn btn-danger btn-xs" type="submit" name="delete_all" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|