eureka_ruby 0.0.4 → 0.0.5

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: 1292f85d94375a44a8119ab57d3ad7b926639acb9f2992ba5886868f456a19fd
4
- data.tar.gz: ab6d92aaef6b3ffa2a0fa960bc6b9db5dd30a02eddf188e393ca4206480c10fa
3
+ metadata.gz: c231db815b0ed282be2c0c09d4e6884f3af8c86f26bad2914dc6b824e66340d1
4
+ data.tar.gz: 58e143edfe4d917627359ff2f5fc2f1f91def2e2eae14608bb771c8048ec80d2
5
5
  SHA512:
6
- metadata.gz: 79a378788198a02bf39ecb559eb49735a326290bb36408c62cce8d301275968122483176b64a91dd650125153db460ba04671006dbacfdd07112aea9433e42d4
7
- data.tar.gz: 8e5ae517137f91ea9105bd1d884d7220b0dfc45e2d29284740b3617b0f07c0a39268ba91393871095985761d67f794a7c4f03ed1e150a02fb887fe1fbd7deed8
6
+ metadata.gz: b975c783dab0ca17cd34263eee9a21e6b4e104c15429ac1cd7a4ae42f2ecb6592d20a956a02cceb5a95c93187ccc4a50bcc3654ecaf55c35f39035425cde2f02
7
+ data.tar.gz: 7b361bd5529480821b072b4b246ca12d7a7815aa108acf179fe3f6e093b3faa4f4e966e9229c946434102107c13dc87a908168fe3f05958b60d55f4a8c7b4768
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EurekaRuby
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
@@ -26,6 +26,11 @@ if ENV['EUREKA']
26
26
  Thread.new do
27
27
  loop do
28
28
  EurekaRuby.executor.run(:send_heartbeat)
29
+ rescue => ex
30
+ error_text = "发送心跳到 Eureka 失败: #{ex.message}\n#{ex.backtrace.join("\n")}"
31
+ Rails.logger.error(error_text)
32
+ NewRelic::Agent.notice_error(error_text) if defined?(NewRelic)
33
+ ensure
29
34
  sleep ENV.fetch('EUREKA_HEARTBEAT_PERIOD', 10).to_i
30
35
  end
31
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eureka_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - 乌托邦科技
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-05 00:00:00.000000000 Z
11
+ date: 2019-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler