capistrano_sentinel 0.0.6 → 0.0.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f6de2fd490ee1cf1d73e9e1b19f134189c9cfa7
|
4
|
+
data.tar.gz: caf83842315495fb25ea4c5dc3a174566e542cb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b54133bf18bfeb9ccced785c164bfd804445be0b10549120d8bfda1c0247ae8b0bbb066839c44a98deef25508e40e101d1c79700e998c3777a829c7d3210706f
|
7
|
+
data.tar.gz: 9465f4138eaec630047a2bca161c3a6c10a4a73bcaf4bce3f72e5bb1be00c83b02d536de2f0db41b4ed801a589978a448a59225aa2d559fef95840d2b0247b68
|
@@ -110,7 +110,7 @@ module CapistranoSentinel
|
|
110
110
|
#
|
111
111
|
# @api public
|
112
112
|
def subscribe(channel, data = {})
|
113
|
-
log_to_file("#{
|
113
|
+
log_to_file("#{self.class} tries to subscribe to channel #{channel}")
|
114
114
|
send_action('subscribe', channel, data)
|
115
115
|
end
|
116
116
|
|
@@ -182,7 +182,7 @@ module CapistranoSentinel
|
|
182
182
|
else
|
183
183
|
final_message = JSON.dump(action: 'message', message: message)
|
184
184
|
end
|
185
|
-
log_to_file("#{
|
185
|
+
log_to_file("#{self.class} sends JSON #{final_message}")
|
186
186
|
send_data(final_message)
|
187
187
|
end
|
188
188
|
|
@@ -223,7 +223,7 @@ module CapistranoSentinel
|
|
223
223
|
begin
|
224
224
|
connect
|
225
225
|
rescue ::Errno::ECONNREFUSED => e
|
226
|
-
log_to_file("#{
|
226
|
+
log_to_file("#{self.class} got ECONNREFUSED #{e.inspect} ")
|
227
227
|
sleep @options[:retry_time]
|
228
228
|
rescue => e
|
229
229
|
fire_on_error e
|
@@ -251,7 +251,7 @@ module CapistranoSentinel
|
|
251
251
|
@protocol_version = handshake.version
|
252
252
|
@active = true
|
253
253
|
@opened = true
|
254
|
-
log_to_file("#{
|
254
|
+
log_to_file("#{self.class} got handshake finished ")
|
255
255
|
init_messaging
|
256
256
|
fire_on_open
|
257
257
|
break
|
@@ -270,9 +270,9 @@ module CapistranoSentinel
|
|
270
270
|
end
|
271
271
|
end
|
272
272
|
rescue ::IO::WaitReadable => e
|
273
|
-
#log_to_file("#{
|
273
|
+
#log_to_file("#{self.class} got WaitReadable #{e.inspect}")
|
274
274
|
rescue ::IO::WaitWritable => e
|
275
|
-
#log_to_file("#{
|
275
|
+
#log_to_file("#{self.class} got WaitWritable #{e.inspect}")
|
276
276
|
# ignored
|
277
277
|
end
|
278
278
|
end
|
@@ -294,7 +294,7 @@ module CapistranoSentinel
|
|
294
294
|
end
|
295
295
|
fire_on_error CapistranoSentinel::WsProtocolError.new(frame.error) if frame.error?
|
296
296
|
rescue => e
|
297
|
-
log_to_file("#{
|
297
|
+
log_to_file("#{self.class} crashed with #{e.inspect} #{e.backtrace}")
|
298
298
|
fire_on_error(e)
|
299
299
|
if @socket.closed? || @socket.eof?
|
300
300
|
@read_thread = nil
|
@@ -306,7 +306,7 @@ module CapistranoSentinel
|
|
306
306
|
end
|
307
307
|
|
308
308
|
def determine_message_type(message)
|
309
|
-
log_to_file("#{
|
309
|
+
log_to_file("#{self.class} tries to dispatch message #{message.inspect}")
|
310
310
|
case message.type
|
311
311
|
when :binary, :text
|
312
312
|
fire_on_message(message.data)
|
@@ -336,27 +336,27 @@ module CapistranoSentinel
|
|
336
336
|
end
|
337
337
|
|
338
338
|
def fire_on_ping(message)
|
339
|
-
log_to_file("#{
|
339
|
+
log_to_file("#{self.class} tries to ping #{message.inspect}")
|
340
340
|
@on_ping.call(message) if @on_ping
|
341
341
|
end
|
342
342
|
|
343
343
|
def fire_on_message(message)
|
344
|
-
log_to_file("#{
|
344
|
+
log_to_file("#{self.class} tries to fire_on_message #{message.inspect}")
|
345
345
|
@on_message.call(message) if @on_message
|
346
346
|
end
|
347
347
|
|
348
348
|
def fire_on_open
|
349
|
-
log_to_file("#{
|
349
|
+
log_to_file("#{self.class} tries to on_open ")
|
350
350
|
@on_open.call() if @on_open
|
351
351
|
end
|
352
352
|
|
353
353
|
def fire_on_error(error)
|
354
|
-
log_to_file("#{
|
354
|
+
log_to_file("#{self.class} tries to on_error with #{error.inspect} ")
|
355
355
|
@on_error.call(error) if @on_error
|
356
356
|
end
|
357
357
|
|
358
358
|
def fire_on_close(message = nil)
|
359
|
-
log_to_file("#{
|
359
|
+
log_to_file("#{self.class} tries to fire_on_close with #{message.inspect} ")
|
360
360
|
@active = false
|
361
361
|
@closed = true
|
362
362
|
@on_close.call(message) if @on_close
|