aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhenium <rhenium@rhe.jp>2013-12-20 22:49:49 +0900
committerRhenium <rhenium@rhe.jp>2013-12-20 22:49:49 +0900
commitfe149b9c821b180b28fe1a141a96f75df9e1a122 (patch)
treedda9fd366820dc93f359eba728ee45e11c4515d4
parent32c7d9a145076560ad8e79cefaf5277ee3e18c34 (diff)
downloadaclog-fe149b9c821b180b28fe1a141a96f75df9e1a122.tar.gz
update workers
-rw-r--r--collector/user_stream.rb2
-rw-r--r--lib/aclog/receiver/collector_connection.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/collector/user_stream.rb b/collector/user_stream.rb
index 07951a4..7886694 100644
--- a/collector/user_stream.rb
+++ b/collector/user_stream.rb
@@ -46,7 +46,7 @@ module Aclog
client.on_unauthorized do
log(:warn, "Unauthorized")
- callback(:unauthorized, id: @account_id)
+ callback(:unauthorized, id: @account_id, user_id: @user_id)
stop
end
diff --git a/lib/aclog/receiver/collector_connection.rb b/lib/aclog/receiver/collector_connection.rb
index 9f43f00..6ba7175 100644
--- a/lib/aclog/receiver/collector_connection.rb
+++ b/lib/aclog/receiver/collector_connection.rb
@@ -57,7 +57,7 @@ module Aclog
case msg["type"]
when "unauthorized"
@channel << -> {
- log(:warn, "unauthorized: #{msg["user_id"]}")
+ log(:warn, "unauthorized: ##{msg["id"]}/#{msg["user_id"]}")
}
when "tweet"
@channel << -> {
@@ -121,7 +121,7 @@ module Aclog
worker_number = (Settings.collector.count.times.to_a - @connections.keys).sort.first
if worker_number == nil
log(:warn, "all connection alive")
- send_object(type: "fatal", message: "all connection alive")
+ send_object(type: "error", message: "all connection alive")
close_connection_after_writing
return
end