civo-logger 0.1.9 → 0.2.0

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: cb27f80077ccaf172c29d0fedc2ef1fdf53ad34a
4
- data.tar.gz: 3acef9d27a46262b0ad65d83b97d86358a2b5a44
3
+ metadata.gz: 0d806872c75463ff5d7b2aaa9a2b47b76360fe47
4
+ data.tar.gz: ec89b7afc7abf0b47c3862c54f1ee0961e15b444
5
5
  SHA512:
6
- metadata.gz: dd4d569f2a6f5a8a093a529ad5130d0ccddfca0aa6422952465273e97f7a556299a03f39a06f5a55f8e2e0d467146cde3992aa3d3e3f1c589bc3bca7a8de27da
7
- data.tar.gz: dc088595e67e5b6ced311b77a3563d51efa7dfc8e814f6b3a421b62fbbfeb5d764ecbfa6abdcfb982e13ea66c4f9486c1c25bee4562b46c70dc8ec06dc6d0ec7
6
+ metadata.gz: 8f34289f1b43d794698e322508400583e14ebdc71f0cf54f0b540144953c93f919a44a4d7087594469a9d4ee78e49d835f04c984e9e0b0e0be4491e53865a023
7
+ data.tar.gz: ec245006aa55eb01897e67e93e2090d521647255f2e5a155b5673adfaf9dc7fb1a6ee8abf63a7f9fd0b9980d8c545912811034006d1a5297824daac514a90098
@@ -107,8 +107,11 @@ module Civo
107
107
  end
108
108
 
109
109
  def end_worker
110
- @redis.set("#{app_name}:log:#{@key}", @lines.join("\n"), expires_in: 1.hour)
111
110
  puts @lines.join("\n") if Rails.env.production?
111
+ @redis.set("#{app_name}:log:#{@key}", @lines.join("\n"), expires_in: 1.hour)
112
+ rescue Redis::TimeoutError, Redis::CannotConnectError => e
113
+ puts "ERROR! Redis error #{e.message}"
114
+ ensure
112
115
  @recording = false
113
116
  end
114
117
 
@@ -207,6 +210,9 @@ module Civo
207
210
  end
208
211
  end
209
212
 
213
+ rescue Redis::TimeoutError, Redis::CannotConnectError => e
214
+ puts "ERROR! Redis error #{e.message}"
215
+ ensure
210
216
  @recording = false
211
217
  end
212
218
 
@@ -1,5 +1,5 @@
1
1
  module Civo
2
2
  module Logger
3
- VERSION = "0.1.9"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2017-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler