sidekiq-running 0.0.1 → 0.0.2

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: 4ce8b7d274439f6f640e68d61011993c714025b3
4
- data.tar.gz: d183d45a2fcad08c8ab4c6f5e618f3c5f66afdbe
3
+ metadata.gz: a849f1752910eba28b10c12cbd0e112cbd35aae0
4
+ data.tar.gz: 97a727756281b834260e142a94e476972a171030
5
5
  SHA512:
6
- metadata.gz: 6c6e87606e273c7d8ddfe2339da88b171a62479d4dfe0a005854480026535fc6679a13af983b1314e7d0ff9c2fcae45ef79544cd92c9e8549b1e3d3ebaa6fdb1
7
- data.tar.gz: dee707672729711888c402bfc05c2fa07b991677bc3dd3f24ab3a007694b47bbc616a235c5ab482b1ebae3f577532c62ea5af1417af6acd811ef9302cd00c973
6
+ metadata.gz: dbe8831b8c9dace44f767940bb89deb718d8b05f5e151a111ab821f6c5abdf72bb703f4b06db361fc462a0136679420ff431a3a3268d4b2ee3eba4aa8655338e
7
+ data.tar.gz: b680a15a5a295c1cfd0d96cb8bae31e78ad81963cd32e17622ab54ed9f3f4b3cdb8a93e2af30115e89521dc45c49e09927aea85ffce2a4f6ef9a7f529c7d2fc2
data/README.md CHANGED
@@ -38,6 +38,9 @@ HardWorker.queued?("buy dr.pepper", 10) # => true
38
38
  - queued?(*args)
39
39
  - running?(*args)
40
40
  - queued_or_running?(*args)
41
+ - perform_async_unless_queued(*args)
42
+ - perform_async_unless_running(*args)
43
+ - perform_async_unless_queued_or_running(*args)
41
44
  - queue_name
42
45
 
43
46
  ## Contributing
@@ -30,6 +30,18 @@ module Sidekiq
30
30
  def queued_or_running?(*args)
31
31
  running?(*args) or queued?(*args)
32
32
  end
33
+
34
+ def perform_async_unless_queued(*args)
35
+ perform_async(*args) unless queued?(*args)
36
+ end
37
+
38
+ def perform_async_unless_running(*args)
39
+ perform_async(*args) unless running?(*args)
40
+ end
41
+
42
+ def perform_async_unless_queued_or_running(*args)
43
+ perform_async(*args) unless queued_or_running?(*args)
44
+ end
33
45
  end
34
46
  end
35
47
  end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Running
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-running
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Tomás Albornoz