evt-retry 0.2.0.1 → 0.2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/retry/retry.rb +3 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b99a97e43ae9f0215a6d6de1ad35b313761b1aebfcc06b09edc0af6928fdf1e7
4
- data.tar.gz: d32ba5067f2e621398932da043049200940881437a96620b6049e3dbcbae31a4
3
+ metadata.gz: 83686e7c7fb88b39359854a62635cd915c8fd715568e99c8543cef4e01079043
4
+ data.tar.gz: d07c672e2c2af234833ed69ee05071e74b5e033e4aa7d257e8a3f7fa480c4477
5
5
  SHA512:
6
- metadata.gz: 9604571eb16b4f56d474f46f01190ad846cb0c5805ed33a6a0261d1448ad27f2835dd7bf1aa01bea6472b0815c2d4e79c01adfdb02c4bd2ed5a314d7396286c9
7
- data.tar.gz: 878d7fb4809bdebd15680cdd25bd9e4d649ebe79abe65bd1e98d27207e2619cb99c442ee6a0d8a2a52e30189a65922ddc64196ff43c2ac63ba40cc9fefbf4b45
6
+ metadata.gz: 1a16a80655081e21ad59fd5d7ddb6e1baa53ab8195b6a3e34b27908e26a6ee4780823c6c6a97d8b8819c2616fe8464e26d6d730a7f08dc965f7114a5eee4c7ce
7
+ data.tar.gz: 28c752caf51180390d04e171920c73e67c7e7e14d292af910a0c56999f064bf86683c59d94c80b2cba0ef928cb83993a031f7687ba44e78de220099e1aceafe6
@@ -50,10 +50,12 @@ class Retry
50
50
  action_executed&.call(cycle)
51
51
 
52
52
  if success
53
+ logger.info { "Attempt succeeded (Cycle: #{cycle})" }
54
+ telemetry.record :succeeded, Retry::Telemetry::Data::Succeeded.new(cycle)
53
55
  break
54
56
  end
55
57
 
56
- interval = intervals.next
58
+ interval = intervals.next rescue nil
57
59
 
58
60
  logger.debug { "Attempt failed (Cycle: #{cycle}, Error: #{error.class.name})" }
59
61
  telemetry.record :failed, Retry::Telemetry::Data::Failed.new(cycle, error.class, interval)
@@ -74,9 +76,6 @@ class Retry
74
76
  raise error
75
77
  end
76
78
 
77
- logger.info { "Attempt succeeded (Cycle: #{cycle})" }
78
- telemetry.record :succeeded, Retry::Telemetry::Data::Succeeded.new(cycle)
79
-
80
79
  cycle
81
80
  end
82
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-retry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.1
4
+ version: 0.2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project