Skip to content

Instantly share code, notes, and snippets.

@rosem
Created March 5, 2018 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosem/d8715f1e3f0916bdd42c6e93cdd7a21e to your computer and use it in GitHub Desktop.
Save rosem/d8715f1e3f0916bdd42c6e93cdd7a21e to your computer and use it in GitHub Desktop.
Log 3
Started POST "/rooms/geolocated.xml" for 174.230.18.33 at 2018-03-05 18:54:02 -0500
Processing by RoomsController#geolocated as XML
Parameters: {"ne"=>"38.364919,-121.857899", "res"=>"high", "sw"=>"37.036102,-122.994726"}
^[[1m^[[35mUser Load (0.6ms)^[[0m SELECT "users".* FROM "users" WHERE "users"."authentication_token" = 'SurFrddosuQcXV5ct7d4' AND ("users"."deleted_at" IS NULL) LIMIT 1
User: 382b4b34
User-Agent: Mapchat* 2.0 rev:197 (iPhone; iOS 11.2; en_US)
^[[1m^[[36m (0.1ms)^[[0m ^[[1mBEGIN^[[0m
^[[1m^[[35mUser Exists (0.2ms)^[[0m SELECT 1 AS one FROM "users" WHERE ("users"."uuid" = '6092AA9E-E11E-48F4-B189-FCF6D1F487FF' AND "users"."id" != 26) LIMIT 1
^[[1m^[[36m (0.3ms)^[[0m ^[[1mUPDATE "users" SET "ne_lat" = 38.364919, "ne_lng" = -121.857899, "sw_lat" = 37.036102, "sw_lng" = -122.994726, "updated_at" = '2018-03-05 23:54:03.001998' WHERE "users"."id" = 26^[[0m
[paperclip] Saving attachments.
^[[1m^[[35m (0.6ms)^[[0m COMMIT
^[[1m^[[36mRoom Load (1.7ms)^[[0m ^[[1mSELECT rooms.id, rooms.title, rooms.created_at, rooms.lat, rooms.lng, rooms.channel, rooms.user_id, rooms.messages_count, rooms.photos_count, rooms.followers_count, rooms.contributors_count, rooms.last_message_at, rooms.featured, rooms.override_score, rooms.score, rooms.address, rooms.city, rooms.state, rooms.likes, rooms.private, rooms.category, rooms.updated_at, case when override_score is not null then override_score else score end as rank, sum(rooms_users.unseen) as unseen FROM "rooms" left outer join rooms_users on rooms_users.room_i$
SQRT(POW(69.1*(37.703287364651594-rooms.lat),2)+
POW(54.727069958111706*(-122.43019894897084-rooms.lng),2))
ASC, featured DESC NULLS LAST, last_message_at DESC NULLS LAST LIMIT 50^[[0m
^[[1m^[[35mMessage Load (0.6ms)^[[0m SELECT id, content, created_at, user_id, room_id, photo_file_name, photo_updated_at, photo_meta FROM "messages" WHERE "messages"."room_id" IN (34, 37, 38, 35, 36, 40, 39, 33, 41) AND (messages.user_id not in (select users.id from users where blocked = true)) AND (messages.user_id not in (select blocked_id from blocked_users where blocked_users.user_id = 26 union select user_id from blocked_users where blocked_users.blocked_id = 26 union select users.id from users where blocked = true)) ORDER BY created_at ASC
^[[1m^[[36mMessage Load (0.5ms)^[[0m ^[[1mSELECT id, created_at, user_id, room_id FROM "messages" WHERE "messages"."room_id" IN (34, 37, 38, 35, 36, 40, 39, 33, 41) AND (messages.user_id not in (select users.id from users where blocked = true)) AND (messages.user_id not in (select blocked_id from blocked_users where blocked_users.user_id = 26 union select user_id from blocked_users where blocked_users.blocked_id = 26 union select users.id from users where blocked = true)) ORDER BY created_at DESC^[[0m
^[[1m^[[35mUser Load (0.2ms)^[[0m SELECT id, pseudo, avatar_file_name, avatar_updated_at FROM "users" WHERE "users"."id" IN (26) AND ("users"."deleted_at" IS NULL)
Cache read: index_153/rooms/34-20180302211845//2018-03-02 21:18:45 UTC
Cache fetch_hit: index_153/rooms/34-20180302211845//2018-03-02 21:18:45 UTC
Cache read: index_153/rooms/37-20180303021817//2018-03-03 02:18:17 UTC
Cache generate: index_153/rooms/37-20180303021817//2018-03-03 02:18:17 UTC
undefined method `distance' for #<Room:0x00000006ea7ee0>
Rendered inline template (0.4ms)
Completed 500 Internal Server Error in 98ms (Views: 1.0ms | ActiveRecord: 4.8ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment