diff --git a/app/controllers/chat_controller.rb b/app/controllers/chat_controller.rb index f08f138..e610994 100644 --- a/app/controllers/chat_controller.rb +++ b/app/controllers/chat_controller.rb @@ -68,9 +68,14 @@ class ChatController < ApplicationController query_name = nil ok = false else - query_name = query_user.name - query_pic = query_user.picurl - ok = true + if query_name == @user.name + query_name = nil + ok = false + else + query_name = query_user.name + query_pic = query_user.picurl + ok = true + end end else if all_user_names.include? query_name or query_name == @user.name diff --git a/logs.txt b/logs.txt index 314c692..0d1fb42 100644 --- a/logs.txt +++ b/logs.txt @@ -1,101 +1,101 @@ -2017-01-05T14:20:27.363943+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `block in tagged' -2017-01-05T14:20:27.363944+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `tagged' -2017-01-05T14:20:27.363946+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/request_id.rb:24:in `call' -2017-01-05T14:20:27.363945+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:in `call' -2017-01-05T14:20:27.363947+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call' -2017-01-05T14:20:27.363947+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call' -2017-01-05T14:20:27.363948+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' -2017-01-05T14:20:27.363949+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call' -2017-01-05T14:20:27.363949+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/static.rb:136:in `call' -2017-01-05T14:20:27.363950+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call' -2017-01-05T14:20:27.363953+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:415:in `process_client' -2017-01-05T14:20:27.363951+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:522:in `call' -2017-01-05T14:20:27.363951+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/configuration.rb:225:in `call' -2017-01-05T14:20:27.363952+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:578:in `handle_request' -2017-01-05T14:20:27.363953+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:275:in `block in run' -2017-01-05T14:20:27.363954+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:116:in `call' -2017-01-05T14:20:27.363955+00:00 app[web.1]: [1eff8466-8d38-4f33-aaf7-352eea6d6f15] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:116:in `block in spawn_thread' -2017-01-05T14:20:27.455546+00:00 app[web.1]: I, [2017-01-05T14:20:27.455377 #4] INFO -- : [df174755-766a-436e-bf48-24474877a32c] Started GET "/data/7642f338171e1cdc30500f57a3886cc0.jpg" for 121.195.114.162 at 2017-01-05 14:20:27 +0000 -2017-01-05T14:20:27.456620+00:00 app[web.1]: F, [2017-01-05T14:20:27.456574 #4] FATAL -- : [df174755-766a-436e-bf48-24474877a32c] -2017-01-05T14:20:27.456754+00:00 app[web.1]: F, [2017-01-05T14:20:27.456712 #4] FATAL -- : [df174755-766a-436e-bf48-24474877a32c] ActionController::RoutingError (No route matches [GET] "/data/7642f338171e1cdc30500f57a3886cc0.jpg"): -2017-01-05T14:20:27.456812+00:00 app[web.1]: F, [2017-01-05T14:20:27.456770 #4] FATAL -- : [df174755-766a-436e-bf48-24474877a32c] -2017-01-05T14:20:27.456932+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' -2017-01-05T14:20:27.456933+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:in `block in call' -2017-01-05T14:20:27.456930+00:00 app[web.1]: F, [2017-01-05T14:20:27.456886 #4] FATAL -- : [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' -2017-01-05T14:20:27.456933+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:36:in `call_app' -2017-01-05T14:20:27.456935+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:26:in `tagged' -2017-01-05T14:20:27.456934+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `block in tagged' -2017-01-05T14:20:27.456936+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `tagged' -2017-01-05T14:20:27.456936+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:in `call' -2017-01-05T14:20:27.456941+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/static.rb:136:in `call' -2017-01-05T14:20:27.456937+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/request_id.rb:24:in `call' -2017-01-05T14:20:27.456942+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:522:in `call' -2017-01-05T14:20:27.456938+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call' -2017-01-05T14:20:27.456939+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call' -2017-01-05T14:20:27.456940+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' -2017-01-05T14:20:27.456942+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call' -2017-01-05T14:20:27.456940+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call' -2017-01-05T14:20:27.456943+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/configuration.rb:225:in `call' -2017-01-05T14:20:27.456944+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:578:in `handle_request' -2017-01-05T14:20:27.456944+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:415:in `process_client' -2017-01-05T14:20:27.456945+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:275:in `block in run' -2017-01-05T14:20:27.456945+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:116:in `call' -2017-01-05T14:20:27.456946+00:00 app[web.1]: [df174755-766a-436e-bf48-24474877a32c] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:116:in `block in spawn_thread' -2017-01-05T14:20:27.457838+00:00 heroku[router]: at=info method=GET path="/data/7642f338171e1cdc30500f57a3886cc0.jpg" host=se-guoren-test.herokuapp.com request_id=df174755-766a-436e-bf48-24474877a32c fwd="121.195.114.162" dyno=web.1 connect=1ms service=4ms status=404 bytes=1744 -2017-01-05T14:20:27.786367+00:00 heroku[router]: at=info method=GET path="/notify" host=se-guoren-test.herokuapp.com request_id=dc229b77-4aee-412d-bff7-5f0f9716c584 fwd="121.195.114.162" dyno=web.1 connect=1ms service=18ms status=304 bytes=669 -2017-01-05T14:20:27.767325+00:00 app[web.1]: I, [2017-01-05T14:20:27.767254 #4] INFO -- : [dc229b77-4aee-412d-bff7-5f0f9716c584] Started GET "/notify" for 121.195.114.162 at 2017-01-05 14:20:27 +0000 -2017-01-05T14:20:27.769532+00:00 app[web.1]: I, [2017-01-05T14:20:27.769476 #4] INFO -- : [dc229b77-4aee-412d-bff7-5f0f9716c584] Processing by ChatController#notify as JSON -2017-01-05T14:20:27.773534+00:00 app[web.1]: D, [2017-01-05T14:20:27.773468 #4] DEBUG -- : [dc229b77-4aee-412d-bff7-5f0f9716c584] User Load (1.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] -2017-01-05T14:20:27.781604+00:00 app[web.1]: D, [2017-01-05T14:20:27.781535 #4] DEBUG -- : [dc229b77-4aee-412d-bff7-5f0f9716c584]  (1.6ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] -2017-01-05T14:20:27.782458+00:00 app[web.1]: I, [2017-01-05T14:20:27.782394 #4] INFO -- : [dc229b77-4aee-412d-bff7-5f0f9716c584] Completed 200 OK in 13ms (Views: 0.4ms | ActiveRecord: 5.8ms) -2017-01-05T14:20:27.387061+00:00 heroku[router]: at=info method=GET path="/images/logo/guoren-small.png" host=se-guoren-test.herokuapp.com request_id=53d38b6b-303e-4c12-87bf-e77737ade6b5 fwd="121.195.114.162" dyno=web.1 connect=0ms service=2ms status=200 bytes=24466 -2017-01-05T14:20:32.870350+00:00 heroku[router]: at=info method=GET path="/profile" host=se-guoren-test.herokuapp.com request_id=b9b0de5d-aa1d-4f30-aa33-738a3e7bd447 fwd="121.195.114.162" dyno=web.1 connect=1ms service=20ms status=200 bytes=13401 -2017-01-05T14:20:32.846195+00:00 app[web.1]: I, [2017-01-05T14:20:32.846111 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Started GET "/profile" for 121.195.114.162 at 2017-01-05 14:20:32 +0000 -2017-01-05T14:20:32.847006+00:00 app[web.1]: I, [2017-01-05T14:20:32.846940 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Processing by UsersController#edit as HTML -2017-01-05T14:20:32.854986+00:00 app[web.1]: D, [2017-01-05T14:20:32.854893 #4] DEBUG -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] User Load (1.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] -2017-01-05T14:20:32.856537+00:00 app[web.1]: I, [2017-01-05T14:20:32.856484 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Rendering users/edit.html.erb within layouts/application -2017-01-05T14:20:32.861381+00:00 app[web.1]: I, [2017-01-05T14:20:32.861287 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Rendered users/edit.html.erb within layouts/application (4.6ms) -2017-01-05T14:20:32.861795+00:00 app[web.1]: I, [2017-01-05T14:20:32.861746 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Rendered layouts/_title.html.erb (0.1ms) -2017-01-05T14:20:32.862240+00:00 app[web.1]: I, [2017-01-05T14:20:32.862177 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Rendered layouts/_refer.html.erb (0.0ms) -2017-01-05T14:20:32.857582+00:00 app[web.1]: I, [2017-01-05T14:20:32.857532 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Rendered layouts/_nav.html.erb (0.1ms) -2017-01-05T14:20:32.862738+00:00 app[web.1]: I, [2017-01-05T14:20:32.862692 #4] INFO -- : [b9b0de5d-aa1d-4f30-aa33-738a3e7bd447] Completed 200 OK in 16ms (Views: 7.2ms | ActiveRecord: 1.5ms) -2017-01-05T14:20:34.158404+00:00 heroku[router]: at=info method=GET path="/notify" host=se-guoren-test.herokuapp.com request_id=1c2dbc4a-c9a6-4476-8b71-5212aae44502 fwd="121.195.114.162" dyno=web.1 connect=1ms service=15ms status=304 bytes=669 -2017-01-05T14:20:34.141947+00:00 app[web.1]: I, [2017-01-05T14:20:34.141851 #4] INFO -- : [1c2dbc4a-c9a6-4476-8b71-5212aae44502] Started GET "/notify" for 121.195.114.162 at 2017-01-05 14:20:34 +0000 -2017-01-05T14:20:34.143444+00:00 app[web.1]: I, [2017-01-05T14:20:34.143388 #4] INFO -- : [1c2dbc4a-c9a6-4476-8b71-5212aae44502] Processing by ChatController#notify as JSON -2017-01-05T14:20:34.147305+00:00 app[web.1]: D, [2017-01-05T14:20:34.147236 #4] DEBUG -- : [1c2dbc4a-c9a6-4476-8b71-5212aae44502] User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] -2017-01-05T14:20:34.151121+00:00 app[web.1]: D, [2017-01-05T14:20:34.151037 #4] DEBUG -- : [1c2dbc4a-c9a6-4476-8b71-5212aae44502]  (1.2ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] -2017-01-05T14:20:34.152043+00:00 app[web.1]: I, [2017-01-05T14:20:34.151968 #4] INFO -- : [1c2dbc4a-c9a6-4476-8b71-5212aae44502] Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.5ms) -2017-01-05T14:20:44.155317+00:00 heroku[router]: at=info method=GET path="/notify" host=se-guoren-test.herokuapp.com request_id=88ff0080-50d2-491a-b5a8-317f606b4296 fwd="121.195.114.162" dyno=web.1 connect=1ms service=11ms status=304 bytes=669 -2017-01-05T14:20:44.139463+00:00 app[web.1]: I, [2017-01-05T14:20:44.139385 #4] INFO -- : [88ff0080-50d2-491a-b5a8-317f606b4296] Started GET "/notify" for 121.195.114.162 at 2017-01-05 14:20:44 +0000 -2017-01-05T14:20:44.140108+00:00 app[web.1]: I, [2017-01-05T14:20:44.140057 #4] INFO -- : [88ff0080-50d2-491a-b5a8-317f606b4296] Processing by ChatController#notify as JSON -2017-01-05T14:20:44.143897+00:00 app[web.1]: D, [2017-01-05T14:20:44.143804 #4] DEBUG -- : [88ff0080-50d2-491a-b5a8-317f606b4296] User Load (1.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] -2017-01-05T14:20:44.148170+00:00 app[web.1]: D, [2017-01-05T14:20:44.148102 #4] DEBUG -- : [88ff0080-50d2-491a-b5a8-317f606b4296]  (1.4ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] -2017-01-05T14:20:44.148658+00:00 app[web.1]: I, [2017-01-05T14:20:44.148590 #4] INFO -- : [88ff0080-50d2-491a-b5a8-317f606b4296] Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 3.0ms) -2017-01-05T14:20:52.760851+00:00 app[web.1]: I, [2017-01-05T14:20:52.760771 #4] INFO -- : [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] Started POST "/baidu" for 121.195.114.162 at 2017-01-05 14:20:52 +0000 -2017-01-05T14:20:52.761396+00:00 app[web.1]: F, [2017-01-05T14:20:52.761326 #4] FATAL -- : [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] -2017-01-05T14:20:52.761445+00:00 app[web.1]: F, [2017-01-05T14:20:52.761388 #4] FATAL -- : [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] ActionController::RoutingError (No route matches [POST] "/baidu"): -2017-01-05T14:20:52.761494+00:00 app[web.1]: F, [2017-01-05T14:20:52.761445 #4] FATAL -- : [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] -2017-01-05T14:20:52.761567+00:00 app[web.1]: F, [2017-01-05T14:20:52.761510 #4] FATAL -- : [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' -2017-01-05T14:20:52.761569+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' -2017-01-05T14:20:52.761576+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:36:in `call_app' -2017-01-05T14:20:52.761577+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:in `block in call' -2017-01-05T14:20:52.761578+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `block in tagged' -2017-01-05T14:20:52.761579+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:26:in `tagged' -2017-01-05T14:20:52.761579+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `tagged' -2017-01-05T14:20:52.761580+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:in `call' -2017-01-05T14:20:52.761581+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/request_id.rb:24:in `call' -2017-01-05T14:20:52.761581+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call' -2017-01-05T14:20:52.761582+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call' -2017-01-05T14:20:52.761583+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call' -2017-01-05T14:20:52.761583+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' -2017-01-05T14:20:52.761584+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call' -2017-01-05T14:20:52.761584+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/static.rb:136:in `call' -2017-01-05T14:20:52.761585+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:522:in `call' -2017-01-05T14:20:52.761586+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/configuration.rb:225:in `call' -2017-01-05T14:20:52.761586+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:578:in `handle_request' -2017-01-05T14:20:52.761587+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:415:in `process_client' -2017-01-05T14:20:52.761588+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/server.rb:275:in `block in run' -2017-01-05T14:20:52.761588+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:116:in `call' -2017-01-05T14:20:52.761589+00:00 app[web.1]: [6f2dfa49-16fa-4fa4-91ca-edc5d0968157] vendor/bundle/ruby/2.2.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:116:in `block in spawn_thread' -2017-01-05T14:20:52.767706+00:00 heroku[router]: at=info method=POST path="/baidu" host=se-guoren-test.herokuapp.com request_id=6f2dfa49-16fa-4fa4-91ca-edc5d0968157 fwd="121.195.114.162" dyno=web.1 connect=1ms service=4ms status=404 bytes=1744 -2017-01-05T14:20:53.709999+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=se-guoren-test.herokuapp.com request_id=9bbc0df9-17df-40d4-b8db-32f8a3f8f381 fwd="121.195.114.162" dyno=web.1 connect=1ms service=1ms status=304 bytes=48 +2017-01-07T03:09:50.538843+00:00 app[web.1]: I, [2017-01-07T03:09:50.538408 #4] INFO -- : [8aae2697-c3e9-4d57-9118-7a493b5b6908] Started GET "/online" for 121.195.114.208 at 2017-01-07 03:09:50 +0000 +2017-01-07T03:09:50.539188+00:00 app[web.1]: I, [2017-01-07T03:09:50.539108 #4] INFO -- : [8aae2697-c3e9-4d57-9118-7a493b5b6908] Processing by ChatController#online as JSON +2017-01-07T03:09:50.540610+00:00 app[web.1]: D, [2017-01-07T03:09:50.540447 #4] DEBUG -- : [93adbd5b-ddb0-41de-9118-1cb596a7c6b0] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:09:50.542816+00:00 app[web.1]: D, [2017-01-07T03:09:50.542748 #4] DEBUG -- : [8aae2697-c3e9-4d57-9118-7a493b5b6908] User Load (1.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:09:50.545104+00:00 app[web.1]: D, [2017-01-07T03:09:50.545012 #4] DEBUG -- : [93adbd5b-ddb0-41de-9118-1cb596a7c6b0]  (2.4ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:09:50.545602+00:00 app[web.1]: I, [2017-01-07T03:09:50.545547 #4] INFO -- : [93adbd5b-ddb0-41de-9118-1cb596a7c6b0] Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 3.4ms) +2017-01-07T03:09:50.546724+00:00 app[web.1]: D, [2017-01-07T03:09:50.546664 #4] DEBUG -- : [8aae2697-c3e9-4d57-9118-7a493b5b6908] Message Load (1.7ms) SELECT "messages".* FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:09:50.547335+00:00 app[web.1]: D, [2017-01-07T03:09:50.547277 #4] DEBUG -- : [8aae2697-c3e9-4d57-9118-7a493b5b6908] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:09:50.547737+00:00 app[web.1]: I, [2017-01-07T03:09:50.547679 #4] INFO -- : [8aae2697-c3e9-4d57-9118-7a493b5b6908] Completed 200 OK in 8ms (Views: 0.1ms | ActiveRecord: 3.7ms) +2017-01-07T03:09:50.874847+00:00 heroku[router]: at=info method=GET path="/chat?chat_with=%E5%BC%A0%E5%90%8C%E5%AD%A6" host=ucasguoren.herokuapp.com request_id=e300e758-b21d-42c2-8f34-312b41fdf417 fwd="121.195.114.208" dyno=web.1 connect=0ms service=23ms status=304 bytes=669 +2017-01-07T03:09:51.126756+00:00 heroku[router]: at=info method=GET path="/notify" host=ucasguoren.herokuapp.com request_id=91f6c7c4-bf1d-4295-bead-10efe80cdf7d fwd="121.195.114.208" dyno=web.1 connect=0ms service=11ms status=304 bytes=669 +2017-01-07T03:09:51.116109+00:00 app[web.1]: I, [2017-01-07T03:09:51.116020 #4] INFO -- : [91f6c7c4-bf1d-4295-bead-10efe80cdf7d] Started GET "/notify" for 121.195.114.208 at 2017-01-07 03:09:51 +0000 +2017-01-07T03:09:51.117400+00:00 app[web.1]: I, [2017-01-07T03:09:51.117318 #4] INFO -- : [91f6c7c4-bf1d-4295-bead-10efe80cdf7d] Processing by ChatController#notify as JSON +2017-01-07T03:09:51.120443+00:00 app[web.1]: D, [2017-01-07T03:09:51.120371 #4] DEBUG -- : [91f6c7c4-bf1d-4295-bead-10efe80cdf7d] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:09:51.124131+00:00 app[web.1]: D, [2017-01-07T03:09:51.124056 #4] DEBUG -- : [91f6c7c4-bf1d-4295-bead-10efe80cdf7d]  (0.9ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:09:51.124764+00:00 app[web.1]: I, [2017-01-07T03:09:51.124696 #4] INFO -- : [91f6c7c4-bf1d-4295-bead-10efe80cdf7d] Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.8ms) +2017-01-07T03:09:50.851626+00:00 app[web.1]: I, [2017-01-07T03:09:50.851532 #4] INFO -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Started GET "/chat?chat_with=%E5%BC%A0%E5%90%8C%E5%AD%A6" for 121.195.114.208 at 2017-01-07 03:09:50 +0000 +2017-01-07T03:09:50.852420+00:00 app[web.1]: I, [2017-01-07T03:09:50.852360 #4] INFO -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Processing by ChatController#index as JSON +2017-01-07T03:09:50.852478+00:00 app[web.1]: I, [2017-01-07T03:09:50.852426 #4] INFO -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Parameters: {"chat_with"=>"张同学"} +2017-01-07T03:09:50.855005+00:00 app[web.1]: D, [2017-01-07T03:09:50.854947 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:09:50.857838+00:00 app[web.1]: D, [2017-01-07T03:09:50.857772 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Message Load (0.8ms) SELECT DISTINCT "messages"."send_user" FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", true]] +2017-01-07T03:09:50.860242+00:00 app[web.1]: D, [2017-01-07T03:09:50.860178 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Message Load (0.8ms) SELECT DISTINCT "messages"."recieve_user" FROM "messages" WHERE "messages"."send_user" = $1 [["send_user", 4]] +2017-01-07T03:09:50.860688+00:00 app[web.1]: D, [2017-01-07T03:09:50.860634 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:09:50.862792+00:00 app[web.1]: D, [2017-01-07T03:09:50.862734 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:09:50.862198+00:00 app[web.1]: D, [2017-01-07T03:09:50.862139 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Message Load (0.8ms) SELECT DISTINCT "messages"."send_user" FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:09:50.863948+00:00 app[web.1]: D, [2017-01-07T03:09:50.863882 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."name" = $1 LIMIT $2 [["name", "张同学"], ["LIMIT", 1]] +2017-01-07T03:09:50.864960+00:00 app[web.1]: D, [2017-01-07T03:09:50.864892 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417]  (0.7ms) BEGIN +2017-01-07T03:09:50.866888+00:00 app[web.1]: D, [2017-01-07T03:09:50.866835 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Message Load (0.9ms) SELECT "messages".* FROM "messages" WHERE "messages"."send_user" IN (4, 4) AND "messages"."recieve_user" IN (4, 4) FOR UPDATE +2017-01-07T03:09:50.869846+00:00 app[web.1]: D, [2017-01-07T03:09:50.869774 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Message Load (1.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."send_user" IN (4, 4) AND "messages"."recieve_user" IN (4, 4) ORDER BY "messages"."create_time" ASC FOR UPDATE +2017-01-07T03:09:50.872259+00:00 app[web.1]: D, [2017-01-07T03:09:50.872177 #4] DEBUG -- : [e300e758-b21d-42c2-8f34-312b41fdf417]  (1.6ms) COMMIT +2017-01-07T03:09:50.872878+00:00 app[web.1]: I, [2017-01-07T03:09:50.872804 #4] INFO -- : [e300e758-b21d-42c2-8f34-312b41fdf417] Completed 200 OK in 20ms (Views: 0.4ms | ActiveRecord: 8.8ms) +2017-01-07T03:10:03.895601+00:00 heroku[router]: at=info method=GET path="/online" host=ucasguoren.herokuapp.com request_id=e4e4f9a9-a868-4d7e-b122-743da26d2f72 fwd="121.195.114.208" dyno=web.1 connect=0ms service=11ms status=304 bytes=669 +2017-01-07T03:10:03.883974+00:00 app[web.1]: I, [2017-01-07T03:10:03.883866 #4] INFO -- : [e4e4f9a9-a868-4d7e-b122-743da26d2f72] Started GET "/online" for 121.195.114.208 at 2017-01-07 03:10:03 +0000 +2017-01-07T03:10:03.886091+00:00 app[web.1]: I, [2017-01-07T03:10:03.886045 #4] INFO -- : [0c9656cf-e468-4f06-b933-f647f2c47244] Processing by ChatController#notify as JSON +2017-01-07T03:10:03.885701+00:00 app[web.1]: I, [2017-01-07T03:10:03.885644 #4] INFO -- : [0c9656cf-e468-4f06-b933-f647f2c47244] Started GET "/notify" for 121.195.114.208 at 2017-01-07 03:10:03 +0000 +2017-01-07T03:10:03.884638+00:00 app[web.1]: I, [2017-01-07T03:10:03.884565 #4] INFO -- : [e4e4f9a9-a868-4d7e-b122-743da26d2f72] Processing by ChatController#online as JSON +2017-01-07T03:10:03.887896+00:00 app[web.1]: D, [2017-01-07T03:10:03.887829 #4] DEBUG -- : [e4e4f9a9-a868-4d7e-b122-743da26d2f72] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:03.889706+00:00 app[web.1]: D, [2017-01-07T03:10:03.889640 #4] DEBUG -- : [0c9656cf-e468-4f06-b933-f647f2c47244] User Load (2.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:03.892366+00:00 app[web.1]: D, [2017-01-07T03:10:03.892306 #4] DEBUG -- : [e4e4f9a9-a868-4d7e-b122-743da26d2f72] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:03.891731+00:00 app[web.1]: D, [2017-01-07T03:10:03.891650 #4] DEBUG -- : [e4e4f9a9-a868-4d7e-b122-743da26d2f72] Message Load (2.1ms) SELECT "messages".* FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:03.894160+00:00 app[web.1]: D, [2017-01-07T03:10:03.893334 #4] DEBUG -- : [0c9656cf-e468-4f06-b933-f647f2c47244]  (1.7ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:03.893078+00:00 app[web.1]: I, [2017-01-07T03:10:03.893010 #4] INFO -- : [e4e4f9a9-a868-4d7e-b122-743da26d2f72] Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 3.1ms) +2017-01-07T03:10:03.894848+00:00 app[web.1]: I, [2017-01-07T03:10:03.894780 #4] INFO -- : [0c9656cf-e468-4f06-b933-f647f2c47244] Completed 200 OK in 9ms (Views: 0.1ms | ActiveRecord: 3.9ms) +2017-01-07T03:10:04.264879+00:00 heroku[router]: at=info method=GET path="/chat?chat_with=%E5%BC%A0%E5%90%8C%E5%AD%A6" host=ucasguoren.herokuapp.com request_id=2670f327-c0d5-4ce7-af92-22b04fc48aeb fwd="121.195.114.208" dyno=web.1 connect=0ms service=20ms status=304 bytes=669 +2017-01-07T03:10:04.233388+00:00 app[web.1]: I, [2017-01-07T03:10:04.233245 #4] INFO -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Started GET "/chat?chat_with=%E5%BC%A0%E5%90%8C%E5%AD%A6" for 121.195.114.208 at 2017-01-07 03:10:04 +0000 +2017-01-07T03:10:04.234134+00:00 app[web.1]: I, [2017-01-07T03:10:04.234078 #4] INFO -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Processing by ChatController#index as JSON +2017-01-07T03:10:04.234187+00:00 app[web.1]: I, [2017-01-07T03:10:04.234146 #4] INFO -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Parameters: {"chat_with"=>"张同学"} +2017-01-07T03:10:04.236516+00:00 app[web.1]: D, [2017-01-07T03:10:04.236463 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:04.239840+00:00 app[web.1]: D, [2017-01-07T03:10:04.239786 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Message Load (1.8ms) SELECT DISTINCT "messages"."send_user" FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", true]] +2017-01-07T03:10:04.241953+00:00 app[web.1]: D, [2017-01-07T03:10:04.241903 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Message Load (1.2ms) SELECT DISTINCT "messages"."recieve_user" FROM "messages" WHERE "messages"."send_user" = $1 [["send_user", 4]] +2017-01-07T03:10:04.242329+00:00 app[web.1]: D, [2017-01-07T03:10:04.242283 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:04.243766+00:00 app[web.1]: D, [2017-01-07T03:10:04.243718 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Message Load (0.7ms) SELECT DISTINCT "messages"."send_user" FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:04.244105+00:00 app[web.1]: D, [2017-01-07T03:10:04.244057 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:04.245137+00:00 app[web.1]: D, [2017-01-07T03:10:04.245070 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."name" = $1 LIMIT $2 [["name", "张同学"], ["LIMIT", 1]] +2017-01-07T03:10:04.246201+00:00 app[web.1]: D, [2017-01-07T03:10:04.246135 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb]  (0.6ms) BEGIN +2017-01-07T03:10:04.247595+00:00 app[web.1]: D, [2017-01-07T03:10:04.247532 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Message Load (0.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."send_user" IN (4, 4) AND "messages"."recieve_user" IN (4, 4) FOR UPDATE +2017-01-07T03:10:04.248943+00:00 app[web.1]: D, [2017-01-07T03:10:04.248880 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Message Load (0.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."send_user" IN (4, 4) AND "messages"."recieve_user" IN (4, 4) ORDER BY "messages"."create_time" ASC FOR UPDATE +2017-01-07T03:10:04.251069+00:00 app[web.1]: D, [2017-01-07T03:10:04.251001 #4] DEBUG -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb]  (1.6ms) COMMIT +2017-01-07T03:10:04.251618+00:00 app[web.1]: I, [2017-01-07T03:10:04.251562 #4] INFO -- : [2670f327-c0d5-4ce7-af92-22b04fc48aeb] Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 9.0ms) +2017-01-07T03:10:04.581652+00:00 heroku[router]: at=info method=GET path="/notify" host=ucasguoren.herokuapp.com request_id=254edd56-360d-4a8b-9ebb-e29fc0d89d06 fwd="121.195.114.208" dyno=web.1 connect=0ms service=10ms status=304 bytes=669 +2017-01-07T03:10:03.908010+00:00 heroku[router]: at=info method=GET path="/notify" host=ucasguoren.herokuapp.com request_id=0c9656cf-e468-4f06-b933-f647f2c47244 fwd="121.195.114.208" dyno=web.1 connect=0ms service=12ms status=304 bytes=669 +2017-01-07T03:10:04.560544+00:00 app[web.1]: I, [2017-01-07T03:10:04.560462 #4] INFO -- : [254edd56-360d-4a8b-9ebb-e29fc0d89d06] Started GET "/notify" for 121.195.114.208 at 2017-01-07 03:10:04 +0000 +2017-01-07T03:10:04.561235+00:00 app[web.1]: I, [2017-01-07T03:10:04.561183 #4] INFO -- : [254edd56-360d-4a8b-9ebb-e29fc0d89d06] Processing by ChatController#notify as JSON +2017-01-07T03:10:04.563980+00:00 app[web.1]: D, [2017-01-07T03:10:04.563759 #4] DEBUG -- : [254edd56-360d-4a8b-9ebb-e29fc0d89d06] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:04.567559+00:00 app[web.1]: D, [2017-01-07T03:10:04.567480 #4] DEBUG -- : [254edd56-360d-4a8b-9ebb-e29fc0d89d06]  (0.8ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:04.568328+00:00 app[web.1]: I, [2017-01-07T03:10:04.568244 #4] INFO -- : [254edd56-360d-4a8b-9ebb-e29fc0d89d06] Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.7ms) +2017-01-07T03:10:12.085812+00:00 heroku[router]: at=info method=GET path="/online" host=ucasguoren.herokuapp.com request_id=020760d1-ef54-4ada-9592-67e935734f61 fwd="121.195.114.208" dyno=web.1 connect=0ms service=8ms status=304 bytes=669 +2017-01-07T03:10:12.086903+00:00 heroku[router]: at=info method=GET path="/notify" host=ucasguoren.herokuapp.com request_id=e049295b-8841-4d29-a0df-02ee7783129f fwd="121.195.114.208" dyno=web.1 connect=5ms service=10ms status=304 bytes=669 +2017-01-07T03:10:12.066845+00:00 app[web.1]: I, [2017-01-07T03:10:12.066793 #4] INFO -- : [020760d1-ef54-4ada-9592-67e935734f61] Processing by ChatController#online as JSON +2017-01-07T03:10:12.069301+00:00 app[web.1]: D, [2017-01-07T03:10:12.069238 #4] DEBUG -- : [020760d1-ef54-4ada-9592-67e935734f61] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:12.071716+00:00 app[web.1]: D, [2017-01-07T03:10:12.071652 #4] DEBUG -- : [020760d1-ef54-4ada-9592-67e935734f61] Message Load (0.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:12.066256+00:00 app[web.1]: I, [2017-01-07T03:10:12.066182 #4] INFO -- : [020760d1-ef54-4ada-9592-67e935734f61] Started GET "/online" for 121.195.114.208 at 2017-01-07 03:10:12 +0000 +2017-01-07T03:10:12.072676+00:00 app[web.1]: I, [2017-01-07T03:10:12.072619 #4] INFO -- : [020760d1-ef54-4ada-9592-67e935734f61] Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 1.6ms) +2017-01-07T03:10:12.072201+00:00 app[web.1]: D, [2017-01-07T03:10:12.072143 #4] DEBUG -- : [020760d1-ef54-4ada-9592-67e935734f61] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:12.077276+00:00 app[web.1]: I, [2017-01-07T03:10:12.077195 #4] INFO -- : [e049295b-8841-4d29-a0df-02ee7783129f] Started GET "/notify" for 121.195.114.208 at 2017-01-07 03:10:12 +0000 +2017-01-07T03:10:12.077843+00:00 app[web.1]: I, [2017-01-07T03:10:12.077766 #4] INFO -- : [e049295b-8841-4d29-a0df-02ee7783129f] Processing by ChatController#notify as JSON +2017-01-07T03:10:12.080043+00:00 app[web.1]: D, [2017-01-07T03:10:12.079981 #4] DEBUG -- : [e049295b-8841-4d29-a0df-02ee7783129f] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:12.082439+00:00 app[web.1]: D, [2017-01-07T03:10:12.082386 #4] DEBUG -- : [e049295b-8841-4d29-a0df-02ee7783129f]  (0.8ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:12.082860+00:00 app[web.1]: I, [2017-01-07T03:10:12.082805 #4] INFO -- : [e049295b-8841-4d29-a0df-02ee7783129f] Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.5ms) +2017-01-07T03:10:12.443501+00:00 heroku[router]: at=info method=GET path="/chat?chat_with=%E5%BC%A0%E5%90%8C%E5%AD%A6" host=ucasguoren.herokuapp.com request_id=cbba3b6b-d4fa-440f-890b-60517865db34 fwd="121.195.114.208" dyno=web.1 connect=0ms service=18ms status=304 bytes=669 +2017-01-07T03:10:12.425293+00:00 app[web.1]: I, [2017-01-07T03:10:12.425221 #4] INFO -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Started GET "/chat?chat_with=%E5%BC%A0%E5%90%8C%E5%AD%A6" for 121.195.114.208 at 2017-01-07 03:10:12 +0000 +2017-01-07T03:10:12.425962+00:00 app[web.1]: I, [2017-01-07T03:10:12.425916 #4] INFO -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Processing by ChatController#index as JSON +2017-01-07T03:10:12.426008+00:00 app[web.1]: I, [2017-01-07T03:10:12.425971 #4] INFO -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Parameters: {"chat_with"=>"张同学"} +2017-01-07T03:10:12.428494+00:00 app[web.1]: D, [2017-01-07T03:10:12.428442 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:12.430749+00:00 app[web.1]: D, [2017-01-07T03:10:12.430699 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Message Load (0.8ms) SELECT DISTINCT "messages"."send_user" FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", true]] +2017-01-07T03:10:12.432765+00:00 app[web.1]: D, [2017-01-07T03:10:12.432713 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Message Load (0.7ms) SELECT DISTINCT "messages"."recieve_user" FROM "messages" WHERE "messages"."send_user" = $1 [["send_user", 4]] +2017-01-07T03:10:12.433134+00:00 app[web.1]: D, [2017-01-07T03:10:12.433084 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:12.434549+00:00 app[web.1]: D, [2017-01-07T03:10:12.434488 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Message Load (0.7ms) SELECT DISTINCT "messages"."send_user" FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:12.434935+00:00 app[web.1]: D, [2017-01-07T03:10:12.434887 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:12.436015+00:00 app[web.1]: D, [2017-01-07T03:10:12.435963 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."name" = $1 LIMIT $2 [["name", "张同学"], ["LIMIT", 1]] +2017-01-07T03:10:12.436938+00:00 app[web.1]: D, [2017-01-07T03:10:12.436891 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34]  (0.6ms) BEGIN +2017-01-07T03:10:12.438246+00:00 app[web.1]: D, [2017-01-07T03:10:12.438191 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Message Load (0.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."send_user" IN (4, 4) AND "messages"."recieve_user" IN (4, 4) FOR UPDATE +2017-01-07T03:10:12.439522+00:00 app[web.1]: D, [2017-01-07T03:10:12.439468 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Message Load (0.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."send_user" IN (4, 4) AND "messages"."recieve_user" IN (4, 4) ORDER BY "messages"."create_time" ASC FOR UPDATE +2017-01-07T03:10:12.441520+00:00 app[web.1]: D, [2017-01-07T03:10:12.441475 #4] DEBUG -- : [cbba3b6b-d4fa-440f-890b-60517865db34]  (1.6ms) COMMIT +2017-01-07T03:10:12.441946+00:00 app[web.1]: I, [2017-01-07T03:10:12.441903 #4] INFO -- : [cbba3b6b-d4fa-440f-890b-60517865db34] Completed 200 OK in 16ms (Views: 0.2ms | ActiveRecord: 7.4ms) +2017-01-07T03:10:12.759988+00:00 heroku[router]: at=info method=GET path="/notify" host=ucasguoren.herokuapp.com request_id=230df945-d2f2-479b-8e09-b3d48d5f248c fwd="121.195.114.208" dyno=web.1 connect=0ms service=8ms status=304 bytes=669 +2017-01-07T03:10:12.751832+00:00 app[web.1]: I, [2017-01-07T03:10:12.751747 #4] INFO -- : [230df945-d2f2-479b-8e09-b3d48d5f248c] Started GET "/notify" for 121.195.114.208 at 2017-01-07 03:10:12 +0000 +2017-01-07T03:10:12.752470+00:00 app[web.1]: I, [2017-01-07T03:10:12.752420 #4] INFO -- : [230df945-d2f2-479b-8e09-b3d48d5f248c] Processing by ChatController#notify as JSON +2017-01-07T03:10:12.754857+00:00 app[web.1]: D, [2017-01-07T03:10:12.754802 #4] DEBUG -- : [230df945-d2f2-479b-8e09-b3d48d5f248c] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] +2017-01-07T03:10:12.757356+00:00 app[web.1]: D, [2017-01-07T03:10:12.757270 #4] DEBUG -- : [230df945-d2f2-479b-8e09-b3d48d5f248c]  (0.9ms) SELECT COUNT(*) FROM "messages" WHERE "messages"."recieve_user" = $1 AND "messages"."readed" = $2 [["recieve_user", 4], ["readed", false]] +2017-01-07T03:10:12.757996+00:00 app[web.1]: I, [2017-01-07T03:10:12.757871 #4] INFO -- : [230df945-d2f2-479b-8e09-b3d48d5f248c] Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.7ms)