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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/rsmp/logger.rb +1 -0
- data/lib/rsmp/supervisor_proxy.rb +11 -4
- data/lib/rsmp/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: 33b8c859b9c8450af6a45d52a9d42d982c5becdaf1d4424f398b417bc1c387d8
|
|
4
|
+
data.tar.gz: 7f194bb392a69555f7ba30364466dfed9eeb1b04996505fa13af13d9045bb071
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d9da45e5f1a96756cd50f58ea3ce16dc0de51138daa45aa114f432e0531595883c5cf3dba86ad63dd0a33aed7ba02d706f058378c257129a8b877eb45e2246b
|
|
7
|
+
data.tar.gz: 59965992a0e7bcdd6e401fac5baa2e8839c392713812da579865020d6cf5d9cf73d51b250f9be72cab3264fd5a9edd287e85619e2ebab0259fb303da9cfe25ff
|
data/Gemfile.lock
CHANGED
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
|
|
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
|
|
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
|
@@ -23,15 +23,22 @@ module RSMP
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def start
|
|
26
|
-
log "Connecting to
|
|
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
|
|
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
|
|
34
|
-
log "
|
|
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