sidekiq-unique-jobs 7.0.2 → 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 +117 -17
- data/README.md +11 -11
- data/lib/sidekiq_unique_jobs.rb +3 -1
- data/lib/sidekiq_unique_jobs/changelog.rb +2 -2
- data/lib/sidekiq_unique_jobs/digests.rb +2 -2
- data/lib/sidekiq_unique_jobs/lua/shared/_find_digest_in_process_set.lua +1 -1
- data/lib/sidekiq_unique_jobs/orphans/manager.rb +13 -3
- data/lib/sidekiq_unique_jobs/orphans/ruby_reaper.rb +14 -2
- data/lib/sidekiq_unique_jobs/redis/entity.rb +7 -1
- data/lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb +1 -1
- data/lib/sidekiq_unique_jobs/timer_task.rb +78 -0
- 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 +5 -4
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,5 +1,92 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v7.0.6](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.6) (2021-03-19)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.5...v7.0.6)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
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)
|
15
|
+
|
16
|
+
## [v7.0.5](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.5) (2021-03-18)
|
17
|
+
|
18
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.4...v7.0.5)
|
19
|
+
|
20
|
+
**Implemented enhancements:**
|
21
|
+
|
22
|
+
- Improve compatibility with redis-namespace [\#581](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/581) ([Wolfer](https://github.com/Wolfer))
|
23
|
+
|
24
|
+
**Fixed bugs:**
|
25
|
+
|
26
|
+
- RubyReaper treats runtime lock as orphan and delete it [\#580](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/580)
|
27
|
+
- Prefer conn.exists? when possible [\#583](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/583) ([mhenrixon](https://github.com/mhenrixon))
|
28
|
+
- Don't reap :RUN keys when active [\#582](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/582) ([mhenrixon](https://github.com/mhenrixon))
|
29
|
+
|
30
|
+
**Closed issues:**
|
31
|
+
|
32
|
+
- redis-namespace asks to use admistrative commands directly [\#578](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/578)
|
33
|
+
|
34
|
+
## [v7.0.4](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.4) (2021-02-17)
|
35
|
+
|
36
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.3...v7.0.4)
|
37
|
+
|
38
|
+
**Fixed bugs:**
|
39
|
+
|
40
|
+
- Fix uninitialized scheduled task [\#577](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/577) ([ArturT](https://github.com/ArturT))
|
41
|
+
|
42
|
+
## [v7.0.3](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.3) (2021-02-17)
|
43
|
+
|
44
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.2...v7.0.3)
|
45
|
+
|
46
|
+
**Fixed bugs:**
|
47
|
+
|
48
|
+
- Reduce reaper threads [\#576](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/576) ([mhenrixon](https://github.com/mhenrixon))
|
49
|
+
|
50
|
+
**Merged pull requests:**
|
51
|
+
|
52
|
+
- Fix typo in README.md \[ci skip\] [\#575](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/575) ([yujideveloper](https://github.com/yujideveloper))
|
53
|
+
|
54
|
+
## [v7.0.2](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.2) (2021-02-08)
|
55
|
+
|
56
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.1...v7.0.2)
|
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
|
+
|
62
|
+
**Fixed bugs:**
|
63
|
+
|
64
|
+
- Lock not getting properly cleared for some jobs [\#560](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/560)
|
65
|
+
- while\_executing + raise let non-unique jobs to be executed [\#534](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/534)
|
66
|
+
- delete\_by\_digest does not work with the msg\['unique\_digest'\] value available in sidekiq\_retries\_exhausted [\#532](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/532)
|
67
|
+
- Multiple jobs running at the same time [\#531](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/531)
|
68
|
+
- Unable to setup in standalone Ruby project [\#523](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/523)
|
69
|
+
- v7.0.0.beta15 Can't push new jobs to queue [\#501](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/501)
|
70
|
+
- Reaper doesn't work - lua or ruby [\#498](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/498)
|
71
|
+
- Tasks run once, and then there is no launch [\#464](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/464)
|
72
|
+
- Jobs executing and immediately returning [\#418](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/418)
|
73
|
+
- until\_and\_while\_executing + sidekiq retry mechanism [\#395](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/395)
|
74
|
+
- Failed jobs waiting to be retried are not considered when fetching uniqueness [\#394](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/394)
|
75
|
+
- Fix that :PRIMED keys are seemingly not removed [\#574](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/574) ([mhenrixon](https://github.com/mhenrixon))
|
76
|
+
|
77
|
+
**Closed issues:**
|
78
|
+
|
79
|
+
- Just some clarification on the documentation. [\#530](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/530)
|
80
|
+
- Unique Digests dashboard not filtering the full set of results [\#529](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/529)
|
81
|
+
- after\_unlock isn't called unless it's a class method [\#526](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/526)
|
82
|
+
- The job gets JID and goes to dead right away [\#522](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/522)
|
83
|
+
- Able to assign customise Redis setup [\#509](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/509)
|
84
|
+
- SidekiqUniqueJobs::UniqueArgs\#create\_digest is getting called twice [\#391](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/391)
|
85
|
+
|
86
|
+
**Merged pull requests:**
|
87
|
+
|
88
|
+
- Fix example url in documentation [\#572](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/572) ([yboulkaid](https://github.com/yboulkaid))
|
89
|
+
|
3
90
|
## [v7.0.1](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.1) (2021-01-22)
|
4
91
|
|
5
92
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0...v7.0.1)
|
@@ -8,6 +95,7 @@
|
|
8
95
|
|
9
96
|
- Any way to manually clear/reset the changelog history? [\#568](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/568)
|
10
97
|
- Present the entire changelog in its own view [\#569](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/569) ([mhenrixon](https://github.com/mhenrixon))
|
98
|
+
- Give user full control over adding middleware [\#566](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/566) ([mhenrixon](https://github.com/mhenrixon))
|
11
99
|
|
12
100
|
**Fixed bugs:**
|
13
101
|
|
@@ -24,7 +112,6 @@
|
|
24
112
|
|
25
113
|
**Implemented enhancements:**
|
26
114
|
|
27
|
-
- Give user full control over adding middleware [\#566](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/566) ([mhenrixon](https://github.com/mhenrixon))
|
28
115
|
- Fix coverage reporting and add coverage [\#565](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/565) ([mhenrixon](https://github.com/mhenrixon))
|
29
116
|
|
30
117
|
**Fixed bugs:**
|
@@ -73,13 +160,16 @@
|
|
73
160
|
**Fixed bugs:**
|
74
161
|
|
75
162
|
- Rename lock\_args to lock\_args\_method [\#551](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/551) ([mhenrixon](https://github.com/mhenrixon))
|
76
|
-
- Fix RubyReaper active? [\#538](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/538) ([tanner-rutgers](https://github.com/tanner-rutgers))
|
77
163
|
|
78
164
|
**Closed issues:**
|
79
165
|
|
80
166
|
- Documentation incorrect for `delete\_by\_digest` [\#547](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/547)
|
81
167
|
- Locked jobs after kill -9 with while\_executing lock [\#546](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/546)
|
82
168
|
|
169
|
+
**Merged pull requests:**
|
170
|
+
|
171
|
+
- Support apartment [\#540](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/540) ([mhenrixon](https://github.com/mhenrixon))
|
172
|
+
|
83
173
|
## [v7.0.0.beta26](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta26) (2020-10-28)
|
84
174
|
|
85
175
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.25...v7.0.0.beta26)
|
@@ -113,6 +203,7 @@
|
|
113
203
|
**Fixed bugs:**
|
114
204
|
|
115
205
|
- Ruby reaper not working, active jobs queried incorrectly [\#537](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/537)
|
206
|
+
- Fix RubyReaper active? [\#538](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/538) ([tanner-rutgers](https://github.com/tanner-rutgers))
|
116
207
|
|
117
208
|
**Closed issues:**
|
118
209
|
|
@@ -204,7 +295,6 @@
|
|
204
295
|
**Fixed bugs:**
|
205
296
|
|
206
297
|
- Stringify on\_conflict hash in Job prepare method [\#507](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/507) ([jasonbekolay](https://github.com/jasonbekolay))
|
207
|
-
- Fix access to both server and client conflict [\#503](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/503) ([mhenrixon](https://github.com/mhenrixon))
|
208
298
|
|
209
299
|
## [v7.0.0.beta17](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta17) (2020-05-20)
|
210
300
|
|
@@ -214,6 +304,10 @@
|
|
214
304
|
|
215
305
|
- Try GitHub actions [\#505](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/505) ([mhenrixon](https://github.com/mhenrixon))
|
216
306
|
|
307
|
+
**Fixed bugs:**
|
308
|
+
|
309
|
+
- Deep stringify worker options to account for hash in on\_conflict [\#506](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/506) ([jasonbekolay](https://github.com/jasonbekolay))
|
310
|
+
|
217
311
|
## [v7.0.0.beta16](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta16) (2020-05-19)
|
218
312
|
|
219
313
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.22...v7.0.0.beta16)
|
@@ -221,6 +315,8 @@
|
|
221
315
|
**Fixed bugs:**
|
222
316
|
|
223
317
|
- Deprecate configuration options with `default\_` [\#504](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/504) ([mhenrixon](https://github.com/mhenrixon))
|
318
|
+
- Fix access to both server and client conflict [\#503](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/503) ([mhenrixon](https://github.com/mhenrixon))
|
319
|
+
- Use thread-safe digest creation mechanism [\#484](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/484) ([mhenrixon](https://github.com/mhenrixon))
|
224
320
|
|
225
321
|
**Closed issues:**
|
226
322
|
|
@@ -232,7 +328,6 @@
|
|
232
328
|
|
233
329
|
**Fixed bugs:**
|
234
330
|
|
235
|
-
- Deep stringify worker options to account for hash in on\_conflict [\#506](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/506) ([jasonbekolay](https://github.com/jasonbekolay))
|
236
331
|
- \[LockType\] Allow overwriting default lock type at item level [\#497](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/497) ([EmmN](https://github.com/EmmN))
|
237
332
|
|
238
333
|
## [v7.0.0.beta15](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta15) (2020-04-10)
|
@@ -266,10 +361,6 @@
|
|
266
361
|
|
267
362
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta13...v6.0.21)
|
268
363
|
|
269
|
-
**Fixed bugs:**
|
270
|
-
|
271
|
-
- Use thread-safe digest creation mechanism [\#484](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/484) ([mhenrixon](https://github.com/mhenrixon))
|
272
|
-
|
273
364
|
## [v7.0.0.beta13](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta13) (2020-03-26)
|
274
365
|
|
275
366
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta12...v7.0.0.beta13)
|
@@ -286,7 +377,10 @@
|
|
286
377
|
|
287
378
|
- until\_expired is not setting TTL [\#468](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/468)
|
288
379
|
- Fix bug where expiration wasn't set until unlock [\#481](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/481) ([mhenrixon](https://github.com/mhenrixon))
|
289
|
-
|
380
|
+
|
381
|
+
**Merged pull requests:**
|
382
|
+
|
383
|
+
- Allow v7 configuration to work [\#479](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/479) ([mhenrixon](https://github.com/mhenrixon))
|
290
384
|
|
291
385
|
## [v6.0.20](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.20) (2020-03-22)
|
292
386
|
|
@@ -340,6 +434,8 @@
|
|
340
434
|
|
341
435
|
**Fixed bugs:**
|
342
436
|
|
437
|
+
- Use thread-safe digest creation mechanism [\#484](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/484) ([mhenrixon](https://github.com/mhenrixon))
|
438
|
+
- Fix access to lock [\#476](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/476) ([mhenrixon](https://github.com/mhenrixon))
|
343
439
|
- Backport v7 fix for conflicts [\#461](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/461) ([mhenrixon](https://github.com/mhenrixon))
|
344
440
|
|
345
441
|
## [v7.0.0.beta9](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta9) (2019-12-04)
|
@@ -349,6 +445,7 @@
|
|
349
445
|
**Implemented enhancements:**
|
350
446
|
|
351
447
|
- Keys without TTL [\#417](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/417)
|
448
|
+
- Various changes to test and verify reliability [\#463](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/463) ([mhenrixon](https://github.com/mhenrixon))
|
352
449
|
|
353
450
|
**Closed issues:**
|
354
451
|
|
@@ -361,7 +458,6 @@
|
|
361
458
|
**Implemented enhancements:**
|
362
459
|
|
363
460
|
- Allow worker to configure client and server strategies separately [\#402](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/402)
|
364
|
-
- Various changes to test and verify reliability [\#463](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/463) ([mhenrixon](https://github.com/mhenrixon))
|
365
461
|
- Separate client and server on\_conflict [\#462](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/462) ([mhenrixon](https://github.com/mhenrixon))
|
366
462
|
|
367
463
|
**Fixed bugs:**
|
@@ -466,6 +562,7 @@
|
|
466
562
|
|
467
563
|
- Redis is busy running script and script never terminates [\#441](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/441)
|
468
564
|
- Make the ruby reaper plain ruby [\#443](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/443) ([mhenrixon](https://github.com/mhenrixon))
|
565
|
+
- Fix sidekiq develop [\#426](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/426) ([mhenrixon](https://github.com/mhenrixon))
|
469
566
|
|
470
567
|
**Closed issues:**
|
471
568
|
|
@@ -504,9 +601,9 @@
|
|
504
601
|
**Fixed bugs:**
|
505
602
|
|
506
603
|
- Allow Sidekiq::Context to be used for logging [\#429](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/429) ([mhenrixon](https://github.com/mhenrixon))
|
507
|
-
- Fix sidekiq develop [\#426](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/426) ([mhenrixon](https://github.com/mhenrixon))
|
508
604
|
- Reap as many orphans as advertised [\#403](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/403) ([mhenrixon](https://github.com/mhenrixon))
|
509
605
|
- Reaper should remove :INFO keys [\#399](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/399) ([mhenrixon](https://github.com/mhenrixon))
|
606
|
+
- Convert v5 locks when needed [\#375](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/375) ([mhenrixon](https://github.com/mhenrixon))
|
510
607
|
|
511
608
|
**Merged pull requests:**
|
512
609
|
|
@@ -586,7 +683,6 @@
|
|
586
683
|
- Version 6 Ignores Jobs Enqueued in Version 5 [\#345](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/345)
|
587
684
|
- Job will not enqueue even with no existing match [\#342](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/342)
|
588
685
|
- Convert v5 locks when needed [\#375](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/375) ([mhenrixon](https://github.com/mhenrixon))
|
589
|
-
- Always Remove Job ID from uniquejobs Hash [\#347](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/347) ([chadrschroeder](https://github.com/chadrschroeder))
|
590
686
|
|
591
687
|
**Closed issues:**
|
592
688
|
|
@@ -670,6 +766,10 @@
|
|
670
766
|
|
671
767
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.6...v5.0.11)
|
672
768
|
|
769
|
+
**Fixed bugs:**
|
770
|
+
|
771
|
+
- Always Remove Job ID from uniquejobs Hash [\#347](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/347) ([chadrschroeder](https://github.com/chadrschroeder))
|
772
|
+
|
673
773
|
**Closed issues:**
|
674
774
|
|
675
775
|
- concurrent-ruby 1.1.1 is causing this gem to break [\#340](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/340)
|
@@ -789,6 +889,7 @@
|
|
789
889
|
- Sidekiq web [\#297](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/297) ([mhenrixon](https://github.com/mhenrixon))
|
790
890
|
- Document code [\#296](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/296) ([mhenrixon](https://github.com/mhenrixon))
|
791
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))
|
792
893
|
|
793
894
|
**Closed issues:**
|
794
895
|
|
@@ -832,7 +933,6 @@
|
|
832
933
|
**Implemented enhancements:**
|
833
934
|
|
834
935
|
- Prepare for v6 [\#286](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/286) ([mhenrixon](https://github.com/mhenrixon))
|
835
|
-
- Only unlock not delete [\#285](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/285) ([mhenrixon](https://github.com/mhenrixon))
|
836
936
|
|
837
937
|
## [v6.0.0.rc3](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.0.rc3) (2018-06-29)
|
838
938
|
|
@@ -878,6 +978,7 @@
|
|
878
978
|
|
879
979
|
- Legacy support [\#280](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/280)
|
880
980
|
- Adds legacy support [\#281](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/281) ([mhenrixon](https://github.com/mhenrixon))
|
981
|
+
- Adds guard-reek [\#279](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/279) ([mhenrixon](https://github.com/mhenrixon))
|
881
982
|
- Fix UntilExpired [\#278](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/278) ([mhenrixon](https://github.com/mhenrixon))
|
882
983
|
|
883
984
|
## [v6.0.0.beta2](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.0.beta2) (2018-06-25)
|
@@ -895,7 +996,6 @@
|
|
895
996
|
|
896
997
|
**Implemented enhancements:**
|
897
998
|
|
898
|
-
- Adds guard-reek [\#279](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/279) ([mhenrixon](https://github.com/mhenrixon))
|
899
999
|
- Code smells [\#275](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/275) ([mhenrixon](https://github.com/mhenrixon))
|
900
1000
|
- Reject while scheduling [\#273](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/273) ([mhenrixon](https://github.com/mhenrixon))
|
901
1001
|
- Improve testing [\#272](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/272) ([mhenrixon](https://github.com/mhenrixon))
|
@@ -933,7 +1033,6 @@
|
|
933
1033
|
- Remove unnecessary monkey patches for String [\#262](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/262) ([zormandi](https://github.com/zormandi))
|
934
1034
|
- README \> While Executing: remove unnecessary word [\#260](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/260) ([TimCannady](https://github.com/TimCannady))
|
935
1035
|
- Don't skip monkeypatches if ActiveSupport present [\#248](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/248) ([dleavitt](https://github.com/dleavitt))
|
936
|
-
- Better runtime locks [\#241](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/241) ([mhenrixon](https://github.com/mhenrixon))
|
937
1036
|
|
938
1037
|
## [v5.0.10](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v5.0.10) (2017-08-19)
|
939
1038
|
|
@@ -961,6 +1060,7 @@
|
|
961
1060
|
|
962
1061
|
**Merged pull requests:**
|
963
1062
|
|
1063
|
+
- Better runtime locks [\#241](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/241) ([mhenrixon](https://github.com/mhenrixon))
|
964
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))
|
965
1065
|
- Use hscan for Util\#expire [\#229](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/229) ([dmkc](https://github.com/dmkc))
|
966
1066
|
- Fixed documentation example about unique\_args [\#228](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/228) ([andresakata](https://github.com/andresakata))
|
@@ -1320,7 +1420,6 @@
|
|
1320
1420
|
- Do not unlock on sidekiq shutdown [\#87](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/87) ([deltaroe](https://github.com/deltaroe))
|
1321
1421
|
- Remove no-op code, protect global space from test code [\#86](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/86) ([stevenjonescgm](https://github.com/stevenjonescgm))
|
1322
1422
|
- Remove unique lock when executing and clearing jobs in sidekiq fake mode [\#83](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/83) ([crberube](https://github.com/crberube))
|
1323
|
-
- Fix tests. Tests with latest sidekiq versions and ruby versions [\#82](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/82) ([simonoff](https://github.com/simonoff))
|
1324
1423
|
- Duplicate Payload logging configuration [\#81](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/81) ([jprincipe](https://github.com/jprincipe))
|
1325
1424
|
- output log if not unique [\#79](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/79) ([sonots](https://github.com/sonots))
|
1326
1425
|
- Checking Sidekiq::Testing.inline? on testing strategy and connector [\#75](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/75) ([Draiken](https://github.com/Draiken))
|
@@ -1336,6 +1435,7 @@
|
|
1336
1435
|
|
1337
1436
|
**Merged pull requests:**
|
1338
1437
|
|
1438
|
+
- Fix tests. Tests with latest sidekiq versions and ruby versions [\#82](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/82) ([simonoff](https://github.com/simonoff))
|
1339
1439
|
- Use ConnectionPool blocks to ensure exclusive connection. Closes \#66. [\#67](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/67) ([adstage-david](https://github.com/adstage-david))
|
1340
1440
|
|
1341
1441
|
## [v3.0.10](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v3.0.10) (2014-11-19)
|
@@ -1417,6 +1517,7 @@
|
|
1417
1517
|
- Clarify README about unique expiration [\#36](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/36) ([spacemunkay](https://github.com/spacemunkay))
|
1418
1518
|
- Add option to make jobs unique on all queues [\#32](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/32) ([robinmessage](https://github.com/robinmessage))
|
1419
1519
|
- Fix homepage in gemspec [\#29](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/29) ([tmaier](https://github.com/tmaier))
|
1520
|
+
- Compatibility with Sidekiq 2.12.1 Scheduled Jobs [\#16](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/16) ([lsimoneau](https://github.com/lsimoneau))
|
1420
1521
|
|
1421
1522
|
## [v2.7.0](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v2.7.0) (2013-11-24)
|
1422
1523
|
|
@@ -1435,7 +1536,6 @@
|
|
1435
1536
|
- Make unlock/yield order configurable. [\#21](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/21) ([endofunky](https://github.com/endofunky))
|
1436
1537
|
- Rely on Sidekiq's String\#constantize extension instead of rolling our own [\#19](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/19) ([disbelief](https://github.com/disbelief))
|
1437
1538
|
- Attempt to constantize String `worker\_class` arguments passed to client middleware [\#17](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/17) ([disbelief](https://github.com/disbelief))
|
1438
|
-
- Compatibility with Sidekiq 2.12.1 Scheduled Jobs [\#16](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/16) ([lsimoneau](https://github.com/lsimoneau))
|
1439
1539
|
- Allow worker to specify which arguments to include in uniquing hash [\#12](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/12) ([sax](https://github.com/sax))
|
1440
1540
|
- Add support for unique when using Sidekiq's delay function [\#11](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/11) ([eduardosasso](https://github.com/eduardosasso))
|
1441
1541
|
- Adding the unique prefix option [\#8](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/8) ([KensoDev](https://github.com/KensoDev))
|
data/README.md
CHANGED
@@ -185,16 +185,16 @@ Configure SidekiqUniqueJobs in an initializer or the sidekiq initializer on appl
|
|
185
185
|
|
186
186
|
```ruby
|
187
187
|
SidekiqUniqueJobs.configure do |config|
|
188
|
-
config.
|
189
|
-
config.
|
190
|
-
config.
|
191
|
-
config.
|
192
|
-
config.
|
193
|
-
config.max_history =
|
194
|
-
config.reaper = :lua
|
195
|
-
config.reaper_count =
|
196
|
-
config.reaper_interval = 10
|
197
|
-
config.reaper_timeout = 5
|
188
|
+
config.logger = Sidekiq.logger # default, change at your own discretion
|
189
|
+
config.debug_lua = false # Turn on when debugging
|
190
|
+
config.lock_info = false # Turn on when debugging
|
191
|
+
config.lock_ttl = 600 # Expire locks after 10 minutes
|
192
|
+
config.lock_timeout = nil # turn off lock timeout
|
193
|
+
config.max_history = 0 # Turn on when debugging
|
194
|
+
config.reaper = :ruby # :ruby, :lua or :none/nil
|
195
|
+
config.reaper_count = 1000 # Stop reaping after this many keys
|
196
|
+
config.reaper_interval = 600 # Reap orphans every 10 minutes
|
197
|
+
config.reaper_timeout = 150 # Timeout reaper after 2.5 minutes
|
198
198
|
end
|
199
199
|
```
|
200
200
|
|
@@ -903,7 +903,7 @@ RSpec.describe Workers::CoolOne do
|
|
903
903
|
end
|
904
904
|
```
|
905
905
|
|
906
|
-
It is
|
906
|
+
It is recommended to leave the uniqueness testing to the gem maintainers. If you care about how the gem is integration tested have a look at the following specs:
|
907
907
|
|
908
908
|
- [spec/integration/sidekiq_unique_jobs/lock/until_and_while_executing_spec.rb](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/spec/integration/sidekiq_unique_jobs/lock/until_and_while_executing_spec.rb)
|
909
909
|
- [spec/integration/sidekiq_unique_jobs/lock/until_executed_spec.rb](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/spec/integration/sidekiq_unique_jobs/lock/until_executed_spec.rb)
|
data/lib/sidekiq_unique_jobs.rb
CHANGED
@@ -3,9 +3,10 @@
|
|
3
3
|
require "brpoplpush/redis_script"
|
4
4
|
require "concurrent/future"
|
5
5
|
require "concurrent/promises"
|
6
|
-
require "concurrent/timer_task"
|
7
6
|
require "concurrent/map"
|
8
7
|
require "concurrent/mutable_struct"
|
8
|
+
require "concurrent/timer_task"
|
9
|
+
require "concurrent/executor/ruby_single_thread_executor"
|
9
10
|
require "digest"
|
10
11
|
require "digest/sha1"
|
11
12
|
require "erb"
|
@@ -14,6 +15,7 @@ require "json"
|
|
14
15
|
require "pathname"
|
15
16
|
require "sidekiq"
|
16
17
|
|
18
|
+
require "sidekiq_unique_jobs/timer_task"
|
17
19
|
require "sidekiq_unique_jobs/version"
|
18
20
|
require "sidekiq_unique_jobs/version_check"
|
19
21
|
require "sidekiq_unique_jobs/constants"
|
@@ -27,7 +27,7 @@ local function find_digest_in_process_set(digest, threshold)
|
|
27
27
|
else
|
28
28
|
for i = 1, #jobs, 2 do
|
29
29
|
local jobstr = jobs[i +1]
|
30
|
-
if string.find(jobstr, digest) then
|
30
|
+
if string.find(string.gsub(jobstr, ':RUN', ''), string.gsub(digest, ':RUN', '')) then
|
31
31
|
log_debug("Found digest", digest, "in:", workers_key)
|
32
32
|
found = true
|
33
33
|
break
|
@@ -20,12 +20,14 @@ module SidekiqUniqueJobs
|
|
20
20
|
# Starts a separate thread that periodically reaps orphans
|
21
21
|
#
|
22
22
|
#
|
23
|
-
# @return [
|
23
|
+
# @return [SidekiqUniqueJobs::TimerTask] the task that was started
|
24
24
|
#
|
25
|
-
def start # rubocop:disable
|
25
|
+
def start(test_task = nil) # rubocop:disable
|
26
26
|
return if disabled?
|
27
27
|
return if registered?
|
28
28
|
|
29
|
+
self.task = test_task || default_task
|
30
|
+
|
29
31
|
with_logging_context do
|
30
32
|
register_reaper_process
|
31
33
|
log_info("Starting Reaper")
|
@@ -59,7 +61,11 @@ module SidekiqUniqueJobs
|
|
59
61
|
# @return [<type>] <description>
|
60
62
|
#
|
61
63
|
def task
|
62
|
-
@task ||=
|
64
|
+
@task ||= default_task
|
65
|
+
end
|
66
|
+
|
67
|
+
def default_task
|
68
|
+
SidekiqUniqueJobs::TimerTask.new(timer_task_options) do
|
63
69
|
with_logging_context do
|
64
70
|
redis do |conn|
|
65
71
|
refresh_reaper_mutex
|
@@ -69,6 +75,10 @@ module SidekiqUniqueJobs
|
|
69
75
|
end
|
70
76
|
end
|
71
77
|
|
78
|
+
def task=(task)
|
79
|
+
@task = task
|
80
|
+
end
|
81
|
+
|
72
82
|
#
|
73
83
|
# Arguments passed on to the timer task
|
74
84
|
#
|
@@ -10,6 +10,7 @@ module SidekiqUniqueJobs
|
|
10
10
|
# @author Mikael Henriksson <mikael@mhenrixon.com>
|
11
11
|
#
|
12
12
|
class RubyReaper < Reaper
|
13
|
+
RUN_SUFFIX = ":RUN"
|
13
14
|
#
|
14
15
|
# @!attribute [r] digests
|
15
16
|
# @return [SidekiqUniqueJobs::Digests] digest collection
|
@@ -124,7 +125,12 @@ module SidekiqUniqueJobs
|
|
124
125
|
|
125
126
|
procs.sort.each do |key|
|
126
127
|
valid, workers = conn.pipelined do
|
127
|
-
|
128
|
+
# TODO: Remove the if statement in the future
|
129
|
+
if conn.respond_to?(:exists?)
|
130
|
+
conn.exists?(key)
|
131
|
+
else
|
132
|
+
conn.exists(key)
|
133
|
+
end
|
128
134
|
conn.hgetall("#{key}:workers")
|
129
135
|
end
|
130
136
|
|
@@ -136,7 +142,7 @@ module SidekiqUniqueJobs
|
|
136
142
|
|
137
143
|
payload = safe_load_json(item[PAYLOAD])
|
138
144
|
|
139
|
-
return true if payload[LOCK_DIGEST]
|
145
|
+
return true if match?(digest, payload[LOCK_DIGEST])
|
140
146
|
return true if considered_active?(payload[CREATED_AT])
|
141
147
|
end
|
142
148
|
end
|
@@ -145,6 +151,12 @@ module SidekiqUniqueJobs
|
|
145
151
|
end
|
146
152
|
end
|
147
153
|
|
154
|
+
def match?(key_one, key_two)
|
155
|
+
return false if key_one.nil? || key_two.nil?
|
156
|
+
|
157
|
+
key_one.delete_suffix(RUN_SUFFIX) == key_two.delete_suffix(RUN_SUFFIX)
|
158
|
+
end
|
159
|
+
|
148
160
|
def considered_active?(time_f)
|
149
161
|
(Time.now - reaper_timeout).to_f < time_f
|
150
162
|
end
|
@@ -47,7 +47,13 @@ module SidekiqUniqueJobs
|
|
47
47
|
#
|
48
48
|
def exist?
|
49
49
|
redis do |conn|
|
50
|
-
|
50
|
+
# TODO: Remove the if statement in the future
|
51
|
+
value =
|
52
|
+
if conn.respond_to?(:exists?)
|
53
|
+
conn.exists?(key)
|
54
|
+
else
|
55
|
+
conn.exists(key)
|
56
|
+
end
|
51
57
|
|
52
58
|
return value if boolean?(value)
|
53
59
|
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SidekiqUniqueJobs
|
4
|
+
# @see [Concurrent::TimerTask] https://www.rubydoc.info/gems/concurrent-ruby/Concurrent/TimerTask
|
5
|
+
#
|
6
|
+
class TimerTask < ::Concurrent::TimerTask
|
7
|
+
private
|
8
|
+
|
9
|
+
def ns_initialize(opts, &task)
|
10
|
+
set_deref_options(opts)
|
11
|
+
|
12
|
+
self.execution_interval = opts[:execution] || opts[:execution_interval] || EXECUTION_INTERVAL
|
13
|
+
self.timeout_interval = opts[:timeout] || opts[:timeout_interval] || TIMEOUT_INTERVAL
|
14
|
+
@run_now = opts[:now] || opts[:run_now]
|
15
|
+
@executor = Concurrent::RubySingleThreadExecutor.new
|
16
|
+
@running = Concurrent::AtomicBoolean.new(false)
|
17
|
+
@task = task
|
18
|
+
@value = nil
|
19
|
+
|
20
|
+
self.observers = Concurrent::Collection::CopyOnNotifyObserverSet.new
|
21
|
+
end
|
22
|
+
|
23
|
+
def schedule_next_task(interval = execution_interval)
|
24
|
+
exec_task = ->(completion) { execute_task(completion) }
|
25
|
+
Concurrent::ScheduledTask.execute(interval, args: [Concurrent::Event.new], &exec_task)
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
|
29
|
+
# @!visibility private
|
30
|
+
def execute_task(completion) # rubocop:disable Metrics/MethodLength
|
31
|
+
return nil unless @running.true?
|
32
|
+
|
33
|
+
timeout_task = -> { timeout_task(completion) }
|
34
|
+
|
35
|
+
Concurrent::ScheduledTask.execute(
|
36
|
+
timeout_interval,
|
37
|
+
args: [completion],
|
38
|
+
&timeout_task
|
39
|
+
)
|
40
|
+
@thread_completed = Concurrent::Event.new
|
41
|
+
|
42
|
+
@value = @reason = nil
|
43
|
+
@executor.post do
|
44
|
+
@value = @task.call(self)
|
45
|
+
rescue Exception => ex # rubocop:disable Lint/RescueException
|
46
|
+
@reason = ex
|
47
|
+
ensure
|
48
|
+
@thread_completed.set
|
49
|
+
end
|
50
|
+
|
51
|
+
@thread_completed.wait
|
52
|
+
|
53
|
+
if completion.try?
|
54
|
+
schedule_next_task
|
55
|
+
time = Time.now
|
56
|
+
observers.notify_observers do
|
57
|
+
[time, value, @reason]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
nil
|
61
|
+
end
|
62
|
+
|
63
|
+
# @!visibility private
|
64
|
+
def timeout_task(completion)
|
65
|
+
return unless @running.true?
|
66
|
+
return unless completion.try?
|
67
|
+
|
68
|
+
@executor.kill
|
69
|
+
@executor.wait_for_termination
|
70
|
+
@executor = Concurrent::RubySingleThreadExecutor.new
|
71
|
+
|
72
|
+
@thread_completed.set
|
73
|
+
|
74
|
+
schedule_next_task
|
75
|
+
observers.notify_observers(Time.now, nil, Concurrent::TimeoutError.new)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -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') %>" />
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-unique-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brpoplpush-redis_script
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.1.1
|
20
20
|
- - "<="
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.1.1
|
30
30
|
- - "<="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.0.0
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb
|
194
194
|
- lib/sidekiq_unique_jobs/sidekiq_worker_methods.rb
|
195
195
|
- lib/sidekiq_unique_jobs/testing.rb
|
196
|
+
- lib/sidekiq_unique_jobs/timer_task.rb
|
196
197
|
- lib/sidekiq_unique_jobs/timing.rb
|
197
198
|
- lib/sidekiq_unique_jobs/unlockable.rb
|
198
199
|
- lib/sidekiq_unique_jobs/update_version.rb
|