DG IZ; removed puts statements.
This commit is contained in:
parent
a9c9619a54
commit
5dff3369ad
3 changed files with 5 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ class SocketsController < ApplicationController
|
||||||
include Rails.application.routes.url_helpers
|
include Rails.application.routes.url_helpers
|
||||||
|
|
||||||
def incoming(msg)
|
def incoming(msg)
|
||||||
puts "Got a connection to: #{msg}"
|
Rails.logger.info("Socket received connection to: #{msg}")
|
||||||
end
|
end
|
||||||
|
|
||||||
def outgoing(uid,object)
|
def outgoing(uid,object)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ require "lib/diaspora/websocket"
|
||||||
|
|
||||||
sid = Diaspora::WebSocket.subscribe(ws.request['Path'].gsub('/',''), ws)
|
sid = Diaspora::WebSocket.subscribe(ws.request['Path'].gsub('/',''), ws)
|
||||||
|
|
||||||
ws.onmessage { |msg| SocketsController.new.incoming(msg) }#@channel.push msg; puts msg}
|
ws.onmessage { |msg| SocketsController.new.incoming(msg) }
|
||||||
|
|
||||||
ws.onclose { Diaspora::WebSocket.unsubscribe(ws.request['Path'].gsub('/',''), sid) }
|
ws.onclose { Diaspora::WebSocket.unsubscribe(ws.request['Path'].gsub('/',''), sid) }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,9 @@ class MessageHandler
|
||||||
end
|
end
|
||||||
|
|
||||||
http.errback {
|
http.errback {
|
||||||
puts http.response
|
Rails.logger.info(http.response)
|
||||||
puts "failure from #{query.destination}, retrying"
|
Rails.logger.info("Failure from #{query.destination}, retrying...")
|
||||||
|
|
||||||
query.try_count +=1
|
query.try_count +=1
|
||||||
@queue.push query unless query.try_count >= NUM_TRIES
|
@queue.push query unless query.try_count >= NUM_TRIES
|
||||||
process
|
process
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue