sidekiq-throttled 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 781ea0cbad892bcfe6e726f96247ea457e07a824
4
- data.tar.gz: 69cecb30661c7527e56d30c79bb454e6aa79f51f
3
+ metadata.gz: e794a9bc8d61650e7d19521e6e54e71da5d5d4cf
4
+ data.tar.gz: 74e528fb268b1b7906cb53c65d1754210a42ab59
5
5
  SHA512:
6
- metadata.gz: 6c6126e4d3b38713f8a57cc614b3fa7d9ec06a4bd600c9c59ba3bc51ca4ae1d7441dedaca184cda92f064e1f18b9f495c0c022a62495b3212fcf5f3cf7095ffc
7
- data.tar.gz: c639b892aacc37c5f47cb888cfd27656258ec08ac5e510cfdbdf719dd19477d57505067a14ac1798505ae03e4ad3a860c0a6e2ee6fa1d1db61ffe6d99bd8ecd0
6
+ metadata.gz: 585a307eec10d912126d35a492c4b83b41718530d89ade6bf470e8193b8f09b9cf667b1575bec2be920e7a94ed4bb121fe720ac73f5ebe183b120004aff4801b
7
+ data.tar.gz: 55d662289dc68f43afac8ee08567977d5909fb3894700b8eb0ed4d9b6239f705e9fdbd21cc1cc1bb93f59ec98f753532ac1b95c25e2c80ee77eccb0da102c4a4
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.6.3 (2016-09-02)
2
+
3
+ * Enrich internal API to allow better extensibility.
4
+ ([@ixti])
5
+
6
+
1
7
  ## 0.6.2 (2016-09-01)
2
8
 
3
9
  * Add `Fetch.bulk_requeue` used by Sidekiq upon termination.
@@ -30,7 +30,7 @@ module Sidekiq
30
30
  return unless work
31
31
 
32
32
  work = UnitOfWork.new(*work)
33
- return work unless Throttled.throttled? work.job
33
+ return work unless work.throttled?
34
34
 
35
35
  work.throttled_requeue
36
36
 
@@ -26,7 +26,7 @@ module Sidekiq
26
26
  end
27
27
 
28
28
  # Callback that is called by `Sidekiq::Processor` when job was
29
- # succeccfully processed. Most this is used by `ReliableFetch`
29
+ # succeccfully processed. Most likely this is used by `ReliableFetch`
30
30
  # of Sidekiq Pro/Enterprise to remove job from running queue.
31
31
  #
32
32
  # @return [void]
@@ -54,6 +54,14 @@ module Sidekiq
54
54
  Sidekiq.redis { |conn| conn.rpush(QueueName.expand(queue_name), job) }
55
55
  end
56
56
 
57
+ # Tells whenever job should be pushed back to queue (throttled) or not.
58
+ #
59
+ # @see Sidekiq::Throttled.throttled?
60
+ # @return [Boolean]
61
+ def throttled?
62
+ Throttled.throttled? job
63
+ end
64
+
57
65
  # Pushes job back to the head of the queue, so that job won't be tried
58
66
  # immediately after it was requeued (in most cases).
59
67
  #
@@ -3,6 +3,6 @@
3
3
  module Sidekiq
4
4
  module Throttled
5
5
  # Gem version
6
- VERSION = "0.6.2".freeze
6
+ VERSION = "0.6.3".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-throttled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey V Zapparov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-01 00:00:00.000000000 Z
11
+ date: 2016-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq