fastly_nsq 1.4.0 → 1.4.1

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: 3c2224ce762e2487411032220c774087ec93f288
4
- data.tar.gz: c6b22724957b8d1cc9233f07c89a5b3ff0cd765e
3
+ metadata.gz: 2e65fbb2ed6c6dd2005a6e1e2b94699b853692b7
4
+ data.tar.gz: 3e787053513145e1c8937246650304b09cedd203
5
5
  SHA512:
6
- metadata.gz: 426790e527f752f503651e7c34f979eeecbe8908ae1adad34d9ce9d087c7b0d246859b7fa3b7067b22abdae2b4c3f47704f31c015d33b466492e5bca0e7ad16d
7
- data.tar.gz: 6cff0c873d115bf3042f665f7c9ae6ba136f86ca5ec7dd305f1e32bf7e90ffff4e6adbded480ef4a13ba47e9e62ec9a1ae5c23e7011f6a8661131c4d81aa1849
6
+ metadata.gz: bcb774c629e15be874f951c26e7af46f665c0ebce2d9db98a4805e738e8e30bd5cd9b0b231d3a02da1b56df187797d3618357a1f0749f4280e784b8f1816afa9
7
+ data.tar.gz: c7fe9b04e3dfa3d40203ee1a960891177535729550ed7bb7f8382e0df7fc25171956b8aaadb961c8cc1cc4aa9f26bfd546e9b79cb238e2b61a9b8d421d8bc995
@@ -45,6 +45,7 @@ class FastlyNsq::Message
45
45
  private
46
46
 
47
47
  def requeue_period
48
- ((attempts**4) + 45 + (rand(60) * (attempts + 1))) * 1_000
48
+ retry_count = [attempts, 30].min
49
+ ((retry_count**4) + 45 + (rand(60) * (retry_count + 1))) * 1_000
49
50
  end
50
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastlyNsq
4
- VERSION = '1.4.0'
4
+ VERSION = '1.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastly_nsq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tommy O'Neil