canistor 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/canistor.rb +5 -2
- data/lib/canistor/version.rb +1 -1
- 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: 59501e753c65e612e9baebee0b2630d61349aa6ccb118c0fe19d911f35e6ecd9
|
4
|
+
data.tar.gz: c778f30a4bf2b62e9a868da84afddfeb5b32b2a16d9b33ecbc5605e38efcc466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8850ba294c1c67f2a6ed6032c59227f46c4f5a99dafaa0ddb1f2eaff28ee0a017c559a96151356e0fbe730d59af31c82e554afcda668530b874bcb0848acd492
|
7
|
+
data.tar.gz: a9ec578207f4ab60c86d1f35b121395c819a3383b70284c927d1a79aa2f3700e255533d530e86e8ec3081518531b11b128383611433f63d46f97fa988f8fc6e6
|
data/lib/canistor.rb
CHANGED
@@ -177,8 +177,11 @@ module Canistor
|
|
177
177
|
def self.take_fail(operation, &block)
|
178
178
|
fail_mutex.synchronize do
|
179
179
|
if index = @fail.index(operation)
|
180
|
-
|
181
|
-
|
180
|
+
begin
|
181
|
+
block.call
|
182
|
+
ensure
|
183
|
+
@fail.delete_at(index)
|
184
|
+
end
|
182
185
|
end
|
183
186
|
end
|
184
187
|
end
|
data/lib/canistor/version.rb
CHANGED