rsmp 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4072d3e93ef2223bfc9ac2cb1a1e34b3668456e52a622a2b6f059087dd442c2e
4
- data.tar.gz: 37603275646789fec0db5ec4c85baf731bebe6786693e6ad57eae7be3b3c29ed
3
+ metadata.gz: 33b8c859b9c8450af6a45d52a9d42d982c5becdaf1d4424f398b417bc1c387d8
4
+ data.tar.gz: 7f194bb392a69555f7ba30364466dfed9eeb1b04996505fa13af13d9045bb071
5
5
  SHA512:
6
- metadata.gz: 84a5e06ed20c8cb3331cf13ebd9bfc8d2baaf6c81ec14d67e83900d198153d86b89aeb09485f87afa9ef5c2aa7ca4469caa190a745dc9936caedc31bbb14d5a5
7
- data.tar.gz: 9aa602447f391353632bf59fccd2ca48ab2eea492913cab875614c50279c362f04ebbf89559d1ea6a72878ef22e632a29160379b682356e8411568710a9d8525
6
+ metadata.gz: 2d9da45e5f1a96756cd50f58ea3ce16dc0de51138daa45aa114f432e0531595883c5cf3dba86ad63dd0a33aed7ba02d706f058378c257129a8b877eb45e2246b
7
+ data.tar.gz: 59965992a0e7bcdd6e401fac5baa2e8839c392713812da579865020d6cf5d9cf73d51b250f9be72cab3264fd5a9edd287e85619e2ebab0259fb303da9cfe25ff
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.6.3)
4
+ rsmp (0.6.4)
5
5
  async (~> 1.29.1)
6
6
  async-io (~> 1.32.1)
7
7
  colorize (~> 0.8.1)
data/README.md CHANGED
@@ -125,7 +125,7 @@ This will output messages form both the site and the supervisor, ordered chronol
125
125
  ```console
126
126
  RN+SU0001 Starting supervisor RN+SU0001 on port 12111
127
127
  RN+SI0001 Starting site RN+SI0001
128
- RN+SI0001 Connecting to superviser at 127.0.0.1:12111
128
+ RN+SI0001 Connecting to supervisor at 127.0.0.1:12111
129
129
  RN+SI0001 <-- f8c7 Sent Version
130
130
  RN+SU0001 Site connected from 127.0.0.1:53500
131
131
  RN+SU0001 RN+SI0001 --> f8c7 Received Version message for sites [RN+SI0001] using RSMP 3.1.4
@@ -156,7 +156,7 @@ The ```site``` command will start an RSMP site, which will try to connect to one
156
156
  ```console
157
157
  % rsmp site
158
158
  2019-11-11 12:22:00 UTC Starting site RN+SI0001
159
- 2019-11-11 12:22:00 UTC Connecting to superviser at 127.0.0.1:12111
159
+ 2019-11-11 12:22:00 UTC Connecting to supervisor at 127.0.0.1:12111
160
160
  2019-11-11 12:22:00 UTC <-- 792f Sent Version
161
161
  2019-11-11 12:22:00 UTC RN+SU0001 --> e70e Received Version message, using RSMP 3.1.4
162
162
  2019-11-11 12:22:00 UTC RN+SU0001 Connection to supervisor established
data/lib/rsmp/logger.rb CHANGED
@@ -24,6 +24,7 @@ module RSMP
24
24
  'ip'=>false,
25
25
  'port'=>false,
26
26
  'site_id'=>true,
27
+ 'component'=>true,
27
28
  'direction'=>false,
28
29
  'level'=>false,
29
30
  'id'=>true,
@@ -23,15 +23,22 @@ module RSMP
23
23
  end
24
24
 
25
25
  def start
26
- log "Connecting to superviser at #{@ip}:#{@port}", level: :info
26
+ log "Connecting to supervisor at #{@ip}:#{@port}", level: :info
27
27
  super
28
28
  connect
29
29
  @logger.unmute @ip, @port
30
- log "Connected to superviser at #{@ip}:#{@port}", level: :info
30
+ log "Connected to supervisor at #{@ip}:#{@port}", level: :info
31
31
  start_reader
32
32
  send_version @site_settings['site_id'], @site_settings["rsmp_versions"]
33
- rescue Errno::ECONNREFUSED
34
- log "No connection to supervisor at #{@ip}:#{@port}", level: :error
33
+ rescue SystemCallError => e
34
+ log "Could not connect to supervisor at #{@ip}:#{@port}: Errno #{e.errno} #{e}", level: :error
35
+ retry_notice
36
+ rescue StandardError => e
37
+ log "Error while connecting to supervisor at #{@ip}:#{@port}: #{e}", level: :error
38
+ retry_notice
39
+ end
40
+
41
+ def retry_notice
35
42
  unless @site.site_settings['intervals']['reconnect'] == :no
36
43
  log "Will try to reconnect again every #{@site.site_settings['intervals']['reconnect']} seconds..", level: :info
37
44
  @logger.mute @ip, @port
data/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin