sidekiq-throttled 0.6.3 → 0.6.4

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: e794a9bc8d61650e7d19521e6e54e71da5d5d4cf
4
- data.tar.gz: 74e528fb268b1b7906cb53c65d1754210a42ab59
3
+ metadata.gz: 6aedce59e6d54d8e5b87efee69f613db617d7549
4
+ data.tar.gz: 6e8ec470ea953aa7fd43f0a4962dc1a1590538c6
5
5
  SHA512:
6
- metadata.gz: 585a307eec10d912126d35a492c4b83b41718530d89ade6bf470e8193b8f09b9cf667b1575bec2be920e7a94ed4bb121fe720ac73f5ebe183b120004aff4801b
7
- data.tar.gz: 55d662289dc68f43afac8ee08567977d5909fb3894700b8eb0ed4d9b6239f705e9fdbd21cc1cc1bb93f59ec98f753532ac1b95c25e2c80ee77eccb0da102c4a4
6
+ metadata.gz: b5b30e4cc7703c5d40882b43efc78da6cc514af7134f9e22909ee30018778012d4ac193f53cb6f71fa0babc0800bf5601aa93011e0390caed04dfa11e6fe0d32
7
+ data.tar.gz: d94c1159801231e63725d7d55cdd92587248bc1f1bda4d8c6f089c3e1abc0d1341375740263f33e68037e9af08f7e92b364c2b545ca263cb9a19a82be8868568
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.6.4 (2016-09-02)
2
+
3
+ * Rename UNitOfWork throttled requeue to `#requeue_throttled`.
4
+ ([@ixti])
5
+
6
+
1
7
  ## 0.6.3 (2016-09-02)
2
8
 
3
9
  * Enrich internal API to allow better extensibility.
@@ -32,7 +32,7 @@ module Sidekiq
32
32
  work = UnitOfWork.new(*work)
33
33
  return work unless work.throttled?
34
34
 
35
- work.throttled_requeue
35
+ work.requeue_throttled
36
36
 
37
37
  nil
38
38
  end
@@ -54,14 +54,6 @@ 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
-
65
57
  # Pushes job back to the head of the queue, so that job won't be tried
66
58
  # immediately after it was requeued (in most cases).
67
59
  #
@@ -69,9 +61,17 @@ module Sidekiq
69
61
  # Sidekiq performs upon `Sidekiq::Worker.perform_async` call.
70
62
  #
71
63
  # @return [void]
72
- def throttled_requeue
64
+ def requeue_throttled
73
65
  Sidekiq.redis { |conn| conn.lpush(QueueName.expand(queue_name), job) }
74
66
  end
67
+
68
+ # Tells whenever job should be pushed back to queue (throttled) or not.
69
+ #
70
+ # @see Sidekiq::Throttled.throttled?
71
+ # @return [Boolean]
72
+ def throttled?
73
+ Throttled.throttled? job
74
+ end
75
75
  end
76
76
  end
77
77
  end
@@ -3,6 +3,6 @@
3
3
  module Sidekiq
4
4
  module Throttled
5
5
  # Gem version
6
- VERSION = "0.6.3".freeze
6
+ VERSION = "0.6.4".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-throttled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey V Zapparov