chronofage 0.0.13 → 0.0.14

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
  SHA256:
3
- metadata.gz: 00a1b933b3475c55e9261d46f3cf75b15aa5dd5633c631ee3575661afdbde825
4
- data.tar.gz: 0f19dd4fcbc79dfdf337074a53f1d89c20557f4c6b1d273cd30e36223baefbd5
3
+ metadata.gz: 8455cd41db2ba1a8e3fc37f56957717361a00810425585508bbe07fa6c9fafe4
4
+ data.tar.gz: 3d4729105561fd64d0dda8ec3164f4052a272b5d3c320d4b0062023ed023b39d
5
5
  SHA512:
6
- metadata.gz: b7bfef5758997d659e6bbc3867a1bb048b857464471394cc8643bf012dc932f1fbb78884255b34bc42d93f5c5a8614f864ef9ec88cb542a16ff5adaf738dcce6
7
- data.tar.gz: 20c4b24bb82dc453c2e763c92276288db870cb474e3f03e085466274c1911568d8a9dc95243235da3c6a5ef95ec1f4f8f6d8776bc36be01f2798035537a47927
6
+ metadata.gz: c2c6530b6628b143a4668f20fb413e4197d324b794abcc768c6b99c84b51fc329ab403dba5b3b418e0fcf216f52bfcc82d9b70c0e0b052b83c7cdab3cdb1a123
7
+ data.tar.gz: 4b17f2fe410dab6d99a63dd597ad75f87aabbe0c0d88d8e78240c8b81910ab923d91cb0b75bc50d5131162a98193dfe12e34d90b169a7150ff9a9c5d5b4358ac
@@ -36,7 +36,18 @@ module Chronofage
36
36
  end
37
37
 
38
38
  def failed!(output = nil)
39
- update!(failed_at: Time.now, output: output)
39
+ # Sometime we fail because we lose the connection to the database, in that case we retry a few times
40
+
41
+ retries = 3
42
+ begin
43
+ update!(failed_at: Time.now, output: output)
44
+ rescue => error
45
+ raise error if retries == 0
46
+ retries -= 1
47
+
48
+ sleep 5
49
+ retry
50
+ end
40
51
  end
41
52
 
42
53
  def ready?
@@ -1,3 +1,3 @@
1
1
  module Chronofage
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronofage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Goya
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-07-09 00:00:00.000000000 Z
12
+ date: 2019-12-04 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Cron based job scheduler
15
15
  email: