sidekiq-uniq 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b2b32221e78a36897f8403fb309ef2b82e43f9a
4
- data.tar.gz: 9e6ea3a7759fd3a5211efb04ce2135a11d949db8
3
+ metadata.gz: 830971b32d1ecc01a9ddc92b5ce23d4dda540c6f
4
+ data.tar.gz: 1c9d308c6d5393de34a0db60effdd799a018381f
5
5
  SHA512:
6
- metadata.gz: 12b732895efd8b1f4d0712efab9fa808eede82f7fc5d2b7d0d36a5c7623c4f7c57a91c0b76b98ec455be492d0bd8ce6f5fd57f694fea30c73a93adb90937bcc2
7
- data.tar.gz: 26afda27a80958c1e2bc3168b4ba3c3471adeff2a6a12f932ec3d17c5eba42441bfc02ea91988b1992e61b74cf65d5f0b65f5d288a70ac4a2d3027e3425edaf8
6
+ metadata.gz: 39e84f2bfcbddd04f53bb20c649423a54cb30e59fc3e9105b07d14f62263d32961f905f5876bcd40dc7d52c2b867c5bc68d7a8e4cf8e05fd99a26b43d9c885ad
7
+ data.tar.gz: 5b84766dab5e845f78b929dea399ac5a087c11451ceabc9becde53e85daad6f1c272a91b634fe6a2c5e6506d8a6457ed0638047484dee4ffbe89c90cecdf3681
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Sidekiq Uniq
2
2
 
3
- This is an extension for Sidekiq that by default doesn't allow a job to be enqueued if it's already in the queue.
3
+ This is an extension for Sidekiq that by default doesn't allow a job to be enqueued if it's already in the queue or being processed.
4
+
5
+ It does so by keeping in Redis the information about each job's status, where a job is identified by its class and arguments. Possible statuses are: enqueued, running and completed. In case a job fails and is unable to release the lock, all status keys expire (by using Redis' `EXPIRE` command) after some time (which can be defined by `Sidekiq::Uniq::Status.expiration = <time in seconds>`).
4
6
 
5
7
  Useful to use with recurring jobs, like the ones created by [sidekiq-cron](https://github.com/ondrejbartas/sidekiq-cron).
6
8
 
@@ -29,6 +31,8 @@ If you want the default behavior (which is to not allow a job to be enqueued if
29
31
 
30
32
  If you want to avoid the default behavior for a given job, just add `sidekiq_options unique: false` to it.
31
33
 
34
+ Expiration time can be defined like this: `Sidekiq::Uniq::Status.expiration = <time in seconds>`. The dafault value is 30 minutes.
35
+
32
36
  ## Contributing
33
37
 
34
38
  1. Fork it
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Uniq
3
- VERSION = "0.5.0"
3
+ VERSION = "0.6.0"
4
4
  end
5
5
  end
Binary file
data/sidekiq-uniq.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Caio SBA"]
10
10
  spec.email = ["caiosba@gmail.com"]
11
11
 
12
- spec.summary = %q{Unique enqueued jobs for Sidekiq}
13
- spec.description = %q{This is a Sidekiq extension that doesn't allow a job to be enqueued if it's already in the queue}
12
+ spec.summary = %q{Unique enqueued/processing jobs for Sidekiq}
13
+ spec.description = %q{This is a Sidekiq extension that doesn't allow a job to be enqueued if it's already in the queue or being processed}
14
14
  spec.homepage = "https://github.com/caiosba/sidekiq-uniq"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-uniq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caio SBA
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.5.1
55
55
  description: This is a Sidekiq extension that doesn't allow a job to be enqueued if
56
- it's already in the queue
56
+ it's already in the queue or being processed
57
57
  email:
58
58
  - caiosba@gmail.com
59
59
  executables: []
@@ -73,7 +73,7 @@ files:
73
73
  - lib/sidekiq/uniq/railtie.rb
74
74
  - lib/sidekiq/uniq/status.rb
75
75
  - lib/sidekiq/uniq/version.rb
76
- - sidekiq-uniq-0.4.0.gem
76
+ - sidekiq-uniq-0.5.0.gem
77
77
  - sidekiq-uniq.gemspec
78
78
  homepage: https://github.com/caiosba/sidekiq-uniq
79
79
  licenses:
@@ -98,6 +98,6 @@ rubyforge_project:
98
98
  rubygems_version: 2.0.14
99
99
  signing_key:
100
100
  specification_version: 4
101
- summary: Unique enqueued jobs for Sidekiq
101
+ summary: Unique enqueued/processing jobs for Sidekiq
102
102
  test_files: []
103
103
  has_rdoc:
Binary file