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.
- checksums.yaml +4 -4
- data/lib/retry/retry.rb +3 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83686e7c7fb88b39359854a62635cd915c8fd715568e99c8543cef4e01079043
|
4
|
+
data.tar.gz: d07c672e2c2af234833ed69ee05071e74b5e033e4aa7d257e8a3f7fa480c4477
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a16a80655081e21ad59fd5d7ddb6e1baa53ab8195b6a3e34b27908e26a6ee4780823c6c6a97d8b8819c2616fe8464e26d6d730a7f08dc965f7114a5eee4c7ce
|
7
|
+
data.tar.gz: 28c752caf51180390d04e171920c73e67c7e7e14d292af910a0c56999f064bf86683c59d94c80b2cba0ef928cb83993a031f7687ba44e78de220099e1aceafe6
|
data/lib/retry/retry.rb
CHANGED
@@ -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
|