sidekiq-unique-jobs 7.0.2 → 7.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b34494d8b6a8a456d1bae7f88d19d0effa3772a14ec6e835fdb1818684c6429c
4
- data.tar.gz: 05abaa45fb5ae3ff65f0e921da86c9b7df8fea97ba11fbe1f2314f239ccd99e0
3
+ metadata.gz: f03dcf3b8db660243a4a018b9f925ac9dc38031d9bdc95d303f9f70cfe72c3dd
4
+ data.tar.gz: 77a841700f2d99aefe2bd362cdd960cb2c95dd151058f630f6d5559b6451c946
5
5
  SHA512:
6
- metadata.gz: f715b5e6afd217ab5339a295bb43c234ef50e723b683021da9f7136e91d6cc6cf8d966ea50ea8acbe8b700c2f3e6d4503caab89cd39c570d5a906e332d11c873
7
- data.tar.gz: d2dd8182d2e59029a6c440f2a9260a2ea1b8c59be03218c4df616b17e27610fe44f5dae77c492fd156510cd9fa89cd5fcd5212a69f9050069ce6579561f95381
6
+ metadata.gz: 1435327d1917f52e3ab6d7c16fd5cd4985bdee2db1005249b551bb10c207020df11440c1eb65ac8cd959731c96db3e8e02df3975724915dc4802622ff38001bf
7
+ data.tar.gz: 330d28efc520b4d3cb5c7df5561f8afd27a9d7a138edd3bcca6a642185433449bdba7ecf12d9a6d373cbe9f5ecf5b8c7072726e0b328f890e2ea96c74d2c9c1b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## [v7.0.2](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.2) (2021-02-08)
4
+
5
+ [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.1...v7.0.2)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Lock not getting properly cleared for some jobs [\#560](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/560)
10
+ - while\_executing + raise let non-unique jobs to be executed [\#534](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/534)
11
+ - 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)
12
+ - Multiple jobs running at the same time [\#531](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/531)
13
+ - Unable to setup in standalone Ruby project [\#523](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/523)
14
+ - v7.0.0.beta15 Can't push new jobs to queue [\#501](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/501)
15
+ - Reaper doesn't work - lua or ruby [\#498](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/498)
16
+ - Tasks run once, and then there is no launch [\#464](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/464)
17
+ - Jobs executing and immediately returning [\#418](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/418)
18
+ - until\_and\_while\_executing + sidekiq retry mechanism [\#395](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/395)
19
+ - Failed jobs waiting to be retried are not considered when fetching uniqueness [\#394](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/394)
20
+ - Fix that :PRIMED keys are seemingly not removed [\#574](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/574) ([mhenrixon](https://github.com/mhenrixon))
21
+
22
+ **Closed issues:**
23
+
24
+ - Just some clarification on the documentation. [\#530](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/530)
25
+ - Unique Digests dashboard not filtering the full set of results [\#529](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/529)
26
+ - after\_unlock isn't called unless it's a class method [\#526](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/526)
27
+ - The job gets JID and goes to dead right away [\#522](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/522)
28
+ - Able to assign customise Redis setup [\#509](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/509)
29
+ - SidekiqUniqueJobs::UniqueArgs\#create\_digest is getting called twice [\#391](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/391)
30
+
31
+ **Merged pull requests:**
32
+
33
+ - Fix example url in documentation [\#572](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/572) ([yboulkaid](https://github.com/yboulkaid))
34
+
3
35
  ## [v7.0.1](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.1) (2021-01-22)
4
36
 
5
37
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0...v7.0.1)
@@ -12,6 +44,7 @@
12
44
  **Fixed bugs:**
13
45
 
14
46
  - Fix configuration [\#570](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/570) ([mhenrixon](https://github.com/mhenrixon))
47
+ - Prefer lock\_prefix not unique\_prefix [\#554](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/554) ([mhenrixon](https://github.com/mhenrixon))
15
48
 
16
49
  **Closed issues:**
17
50
 
@@ -45,6 +78,7 @@
45
78
 
46
79
  - Ruby Reaper active check incorrect [\#557](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/557)
47
80
  - Routes with authentication should work with web [\#562](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/562) ([mhenrixon](https://github.com/mhenrixon))
81
+ - Fix active check for the worker hash [\#558](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/558) ([mhenrixon](https://github.com/mhenrixon))
48
82
 
49
83
  **Closed issues:**
50
84
 
@@ -58,8 +92,6 @@
58
92
 
59
93
  - lock\_args does not work when you define the lock\_args argument and default lock\_args function at the same time. [\#548](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/548)
60
94
  - incorrect `:while\_executing` behavior [\#432](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/432)
61
- - Fix active check for the worker hash [\#558](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/558) ([mhenrixon](https://github.com/mhenrixon))
62
- - Prefer lock\_prefix not unique\_prefix [\#554](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/554) ([mhenrixon](https://github.com/mhenrixon))
63
95
  - Fix issue 432 [\#552](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/552) ([mhenrixon](https://github.com/mhenrixon))
64
96
 
65
97
  ## [v7.0.0.beta27](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta27) (2020-11-03)
@@ -88,6 +120,7 @@
88
120
 
89
121
  - How to disable Reaper [\#543](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/543)
90
122
  - Allow disabling of reaper [\#544](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/544) ([mhenrixon](https://github.com/mhenrixon))
123
+ - Bump rubocop [\#539](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/539) ([mhenrixon](https://github.com/mhenrixon))
91
124
 
92
125
  **Merged pull requests:**
93
126
 
@@ -106,10 +139,6 @@
106
139
 
107
140
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta24...v7.0.0.beta25)
108
141
 
109
- **Implemented enhancements:**
110
-
111
- - Bump rubocop [\#539](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/539) ([mhenrixon](https://github.com/mhenrixon))
112
-
113
142
  **Fixed bugs:**
114
143
 
115
144
  - Ruby reaper not working, active jobs queried incorrectly [\#537](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/537)
@@ -204,7 +233,6 @@
204
233
  **Fixed bugs:**
205
234
 
206
235
  - 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
236
 
209
237
  ## [v7.0.0.beta17](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta17) (2020-05-20)
210
238
 
@@ -214,6 +242,10 @@
214
242
 
215
243
  - Try GitHub actions [\#505](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/505) ([mhenrixon](https://github.com/mhenrixon))
216
244
 
245
+ **Fixed bugs:**
246
+
247
+ - 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))
248
+
217
249
  ## [v7.0.0.beta16](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta16) (2020-05-19)
218
250
 
219
251
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.22...v7.0.0.beta16)
@@ -221,6 +253,8 @@
221
253
  **Fixed bugs:**
222
254
 
223
255
  - Deprecate configuration options with `default\_` [\#504](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/504) ([mhenrixon](https://github.com/mhenrixon))
256
+ - Fix access to both server and client conflict [\#503](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/503) ([mhenrixon](https://github.com/mhenrixon))
257
+ - Prevent reaping of active jobs [\#493](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/493) ([mhenrixon](https://github.com/mhenrixon))
224
258
 
225
259
  **Closed issues:**
226
260
 
@@ -232,7 +266,6 @@
232
266
 
233
267
  **Fixed bugs:**
234
268
 
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
269
  - \[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
270
 
238
271
  ## [v7.0.0.beta15](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta15) (2020-04-10)
@@ -252,7 +285,6 @@
252
285
  - Reaper will delete locks for running jobs [\#488](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/488)
253
286
  - Fix access to hash members [\#496](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/496) ([mhenrixon](https://github.com/mhenrixon))
254
287
  - Fix cursor assignment [\#494](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/494) ([mhenrixon](https://github.com/mhenrixon))
255
- - Prevent reaping of active jobs [\#493](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/493) ([mhenrixon](https://github.com/mhenrixon))
256
288
 
257
289
  ## [v7.0.0.beta14](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta14) (2020-03-30)
258
290
 
@@ -286,7 +318,6 @@
286
318
 
287
319
  - until\_expired is not setting TTL [\#468](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/468)
288
320
  - 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
- - Fix access to lock [\#476](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/476) ([mhenrixon](https://github.com/mhenrixon))
290
321
 
291
322
  ## [v6.0.20](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.20) (2020-03-22)
292
323
 
@@ -322,7 +353,6 @@
322
353
  - Rename remaining unique\_\* keys to lock\_\* [\#475](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/475) ([mhenrixon](https://github.com/mhenrixon))
323
354
  - Split calculator into two separate [\#474](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/474) ([mhenrixon](https://github.com/mhenrixon))
324
355
  - Prepare for improving tests [\#473](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/473) ([mhenrixon](https://github.com/mhenrixon))
325
- - Update gemspec: thor [\#465](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/465) ([masawo](https://github.com/masawo))
326
356
 
327
357
  **Fixed bugs:**
328
358
 
@@ -340,6 +370,7 @@
340
370
 
341
371
  **Fixed bugs:**
342
372
 
373
+ - Fix access to lock [\#476](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/476) ([mhenrixon](https://github.com/mhenrixon))
343
374
  - Backport v7 fix for conflicts [\#461](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/461) ([mhenrixon](https://github.com/mhenrixon))
344
375
 
345
376
  ## [v7.0.0.beta9](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta9) (2019-12-04)
@@ -349,6 +380,8 @@
349
380
  **Implemented enhancements:**
350
381
 
351
382
  - Keys without TTL [\#417](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/417)
383
+ - Update gemspec: thor [\#465](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/465) ([masawo](https://github.com/masawo))
384
+ - Various changes to test and verify reliability [\#463](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/463) ([mhenrixon](https://github.com/mhenrixon))
352
385
 
353
386
  **Closed issues:**
354
387
 
@@ -361,7 +394,6 @@
361
394
  **Implemented enhancements:**
362
395
 
363
396
  - 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
397
  - Separate client and server on\_conflict [\#462](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/462) ([mhenrixon](https://github.com/mhenrixon))
366
398
 
367
399
  **Fixed bugs:**
@@ -504,7 +536,6 @@
504
536
  **Fixed bugs:**
505
537
 
506
538
  - 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
539
  - Reap as many orphans as advertised [\#403](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/403) ([mhenrixon](https://github.com/mhenrixon))
509
540
  - Reaper should remove :INFO keys [\#399](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/399) ([mhenrixon](https://github.com/mhenrixon))
510
541
 
@@ -531,6 +562,7 @@
531
562
  - Constant SidekiqUniqueJobs::Web::Digests not found [\#396](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/396)
532
563
  - Include redis directory [\#430](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/430) ([mhenrixon](https://github.com/mhenrixon))
533
564
  - Fix v6 [\#428](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/428) ([mhenrixon](https://github.com/mhenrixon))
565
+ - Fix sidekiq develop [\#426](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/426) ([mhenrixon](https://github.com/mhenrixon))
534
566
 
535
567
  **Closed issues:**
536
568
 
@@ -586,7 +618,6 @@
586
618
  - Version 6 Ignores Jobs Enqueued in Version 5 [\#345](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/345)
587
619
  - Job will not enqueue even with no existing match [\#342](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/342)
588
620
  - 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
621
 
591
622
  **Closed issues:**
592
623
 
@@ -670,6 +701,10 @@
670
701
 
671
702
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.6...v5.0.11)
672
703
 
704
+ **Fixed bugs:**
705
+
706
+ - Always Remove Job ID from uniquejobs Hash [\#347](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/347) ([chadrschroeder](https://github.com/chadrschroeder))
707
+
673
708
  **Closed issues:**
674
709
 
675
710
  - concurrent-ruby 1.1.1 is causing this gem to break [\#340](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/340)
@@ -760,6 +795,7 @@
760
795
 
761
796
  - Dead jobs [\#308](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/308) ([mhenrixon](https://github.com/mhenrixon))
762
797
  - Fix require path for sidekiq\_unique\_jobs/web [\#305](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/305) ([soundasleep](https://github.com/soundasleep))
798
+ - Fix README [\#298](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/298) ([mhenrixon](https://github.com/mhenrixon))
763
799
 
764
800
  ## [v6.0.0](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.0) (2018-07-27)
765
801
 
@@ -787,7 +823,6 @@
787
823
  **Implemented enhancements:**
788
824
 
789
825
  - Sidekiq web [\#297](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/297) ([mhenrixon](https://github.com/mhenrixon))
790
- - Document code [\#296](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/296) ([mhenrixon](https://github.com/mhenrixon))
791
826
  - Rename to `unique:` to `lock:` [\#295](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/295) ([mhenrixon](https://github.com/mhenrixon))
792
827
 
793
828
  **Closed issues:**
@@ -798,7 +833,7 @@
798
833
  **Merged pull requests:**
799
834
 
800
835
  - Adds changelog entry [\#299](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/299) ([mhenrixon](https://github.com/mhenrixon))
801
- - Fix README [\#298](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/298) ([mhenrixon](https://github.com/mhenrixon))
836
+ - Readme [\#288](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/288) ([mhenrixon](https://github.com/mhenrixon))
802
837
 
803
838
  ## [v6.0.0.rc6](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.0.rc6) (2018-07-15)
804
839
 
@@ -812,10 +847,6 @@
812
847
 
813
848
  - Locking with retries [\#289](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/289)
814
849
 
815
- **Merged pull requests:**
816
-
817
- - Readme [\#288](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/288) ([mhenrixon](https://github.com/mhenrixon))
818
-
819
850
  ## [v6.0.0.rc5](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.0.rc5) (2018-06-30)
820
851
 
821
852
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.0.rc4...v6.0.0.rc5)
@@ -831,6 +862,7 @@
831
862
 
832
863
  **Implemented enhancements:**
833
864
 
865
+ - Document code [\#296](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/296) ([mhenrixon](https://github.com/mhenrixon))
834
866
  - Prepare for v6 [\#286](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/286) ([mhenrixon](https://github.com/mhenrixon))
835
867
  - Only unlock not delete [\#285](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/285) ([mhenrixon](https://github.com/mhenrixon))
836
868
 
@@ -878,6 +910,7 @@
878
910
 
879
911
  - Legacy support [\#280](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/280)
880
912
  - Adds legacy support [\#281](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/281) ([mhenrixon](https://github.com/mhenrixon))
913
+ - Adds guard-reek [\#279](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/279) ([mhenrixon](https://github.com/mhenrixon))
881
914
  - Fix UntilExpired [\#278](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/278) ([mhenrixon](https://github.com/mhenrixon))
882
915
 
883
916
  ## [v6.0.0.beta2](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.0.beta2) (2018-06-25)
@@ -895,7 +928,6 @@
895
928
 
896
929
  **Implemented enhancements:**
897
930
 
898
- - Adds guard-reek [\#279](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/279) ([mhenrixon](https://github.com/mhenrixon))
899
931
  - Code smells [\#275](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/275) ([mhenrixon](https://github.com/mhenrixon))
900
932
  - Reject while scheduling [\#273](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/273) ([mhenrixon](https://github.com/mhenrixon))
901
933
  - Improve testing [\#272](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/272) ([mhenrixon](https://github.com/mhenrixon))
@@ -949,6 +981,7 @@
949
981
 
950
982
  - Various improvements [\#240](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/240) ([mhenrixon](https://github.com/mhenrixon))
951
983
  - Fix: uninitialized constant CustomQueueJob on rspec [\#239](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/239) ([dalpo](https://github.com/dalpo))
984
+ - Increase sleep delay in WhileExecuting\#synchronize [\#204](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/204) ([dsander](https://github.com/dsander))
952
985
 
953
986
  ## [v5.0.9](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v5.0.9) (2017-07-06)
954
987
 
@@ -1065,7 +1098,6 @@
1065
1098
 
1066
1099
  **Merged pull requests:**
1067
1100
 
1068
- - Increase sleep delay in WhileExecuting\#synchronize [\#204](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/204) ([dsander](https://github.com/dsander))
1069
1101
  - Ensure job ID removed from uniquejobs hash [\#200](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/200) ([carlosmartinez](https://github.com/carlosmartinez))
1070
1102
  - unique args need to be an array [\#194](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/194) ([pboling](https://github.com/pboling))
1071
1103
 
@@ -1438,7 +1470,6 @@
1438
1470
  - Compatibility with Sidekiq 2.12.1 Scheduled Jobs [\#16](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/16) ([lsimoneau](https://github.com/lsimoneau))
1439
1471
  - 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
1472
  - 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
- - Adding the unique prefix option [\#8](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/8) ([KensoDev](https://github.com/KensoDev))
1442
1473
  - Remove unnecessary log messages [\#7](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/7) ([marclennox](https://github.com/marclennox))
1443
1474
 
1444
1475
  ## [v2.3.2](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v2.3.2) (2012-09-27)
@@ -1451,6 +1482,7 @@
1451
1482
 
1452
1483
  **Merged pull requests:**
1453
1484
 
1485
+ - Adding the unique prefix option [\#8](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/8) ([KensoDev](https://github.com/KensoDev))
1454
1486
  - Fix multiple bugs, cleaned up dependencies, and added a feature [\#4](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/4) ([kemper-blinq](https://github.com/kemper-blinq))
1455
1487
  - Dependency on sidekiq 2.2.0 and up [\#3](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/3) ([philostler](https://github.com/philostler))
1456
1488
 
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.debug_lua = true
189
- config.lock_info = true
190
- config.lock_ttl = 10.minutes
191
- config.lock_timeout = 10.minutes
192
- config.logger = Sidekiq.logger
193
- config.max_history = 10_000
194
- config.reaper = :lua
195
- config.reaper_count = 100
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 1,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 recommened 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:
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)
@@ -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"
@@ -20,12 +20,14 @@ module SidekiqUniqueJobs
20
20
  # Starts a separate thread that periodically reaps orphans
21
21
  #
22
22
  #
23
- # @return [Concurrent::TimerTask] the task that was started
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 ||= Concurrent::TimerTask.new(timer_task_options) do
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
  #
@@ -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
+ 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
@@ -3,5 +3,5 @@
3
3
  module SidekiqUniqueJobs
4
4
  #
5
5
  # @return [String] the current SidekiqUniqueJobs version
6
- VERSION = "7.0.2"
6
+ VERSION = "7.0.3"
7
7
  end
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.2
4
+ version: 7.0.3
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-02-08 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brpoplpush-redis_script
@@ -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