Skip to content

Instantly share code, notes, and snippets.

@glebm
Created August 12, 2016 09:24
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 glebm/bea5696199a9d2fdacfeddb44aab1136 to your computer and use it in GitHub Desktop.
Save glebm/bea5696199a9d2fdacfeddb44aab1136 to your computer and use it in GitHub Desktop.
Thredded #352 failure log
User tracking what they have and have not already read
D, [2016-08-12T09:16:45.975024 #5152] DEBUG -- :  (0.1ms) BEGIN
D, [2016-08-12T09:16:45.975303 #5152] DEBUG -- :  (0.2ms) COMMIT
D, [2016-08-12T09:16:45.975575 #5152] DEBUG -- :  (0.1ms) BEGIN
D, [2016-08-12T09:16:45.977178 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:45.978641 #5152] DEBUG -- : SQL (0.3ms) INSERT INTO "users" ("email", "name", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["email", "user220@example.com"], ["name", "Dr. Ellis O'Keefe"], ["created_at", "2016-08-12 09:16:45.977492"], ["updated_at", "2016-08-12 09:16:45.977492"]]
D, [2016-08-12T09:16:45.979315 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:45.980593 #5152] DEBUG -- :  (0.1ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:45.982087 #5152] DEBUG -- : Thredded::Messageboard Exists (0.2ms) SELECT 1 AS one FROM "thredded_messageboards" WHERE ("thredded_messageboards"."id" IS NOT NULL) AND "thredded_messageboards"."slug" = $1 LIMIT 1 [["slug", "messageboard93"]]
D, [2016-08-12T09:16:45.983092 #5152] DEBUG -- : Thredded::Messageboard Exists (0.3ms) SELECT 1 AS one FROM "thredded_messageboards" WHERE "thredded_messageboards"."name" = 'messageboard93' LIMIT 1
D, [2016-08-12T09:16:45.984374 #5152] DEBUG -- : SQL (0.2ms) INSERT INTO "thredded_messageboards" ("name", "description", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "messageboard93"], ["description", "This is a description of the messageboard"], ["slug", "messageboard93"], ["created_at", "2016-08-12 09:16:45.983423"], ["updated_at", "2016-08-12 09:16:45.983423"]]
D, [2016-08-12T09:16:45.985053 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:45.986098 #5152] DEBUG -- :  (0.1ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:45.987215 #5152] DEBUG -- : SQL (0.2ms) INSERT INTO "users" ("email", "name", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["email", "user221@example.com"], ["name", "Antonietta Walker"], ["created_at", "2016-08-12 09:16:45.986340"], ["updated_at", "2016-08-12 09:16:45.986340"]]
D, [2016-08-12T09:16:45.987838 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:45.988339 #5152] DEBUG -- :  (0.1ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:45.989274 #5152] DEBUG -- : Thredded::UserDetail Load (0.2ms) SELECT "thredded_user_details".* FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = $1 LIMIT 1 [["user_id", 100]]
D, [2016-08-12T09:16:45.991960 #5152] DEBUG -- : Thredded::Topic Exists (0.6ms) SELECT 1 AS one FROM "thredded_topics" INNER JOIN "friendly_id_slugs" ON "friendly_id_slugs"."sluggable_id" = "thredded_topics"."id" AND "friendly_id_slugs"."sluggable_type" = $1 WHERE "thredded_topics"."messageboard_id" = $2 AND ("thredded_topics"."id" IS NOT NULL) AND "thredded_topics"."slug" = 'judge-me-by-my-size-do-you' LIMIT 1 [["sluggable_type", "Thredded::Topic"], ["messageboard_id", 29]]
D, [2016-08-12T09:16:45.993364 #5152] DEBUG -- : Thredded::Topic Exists (0.4ms) SELECT 1 AS one FROM "thredded_topics" INNER JOIN "friendly_id_slugs" ON "friendly_id_slugs"."sluggable_id" = "thredded_topics"."id" AND "friendly_id_slugs"."sluggable_type" = $1 WHERE "thredded_topics"."messageboard_id" = $2 AND ("thredded_topics"."id" IS NOT NULL) AND ("friendly_id_slugs"."sluggable_type" = 'Thredded::Topic' AND "friendly_id_slugs"."slug" = 'judge-me-by-my-size-do-you') LIMIT 1 [["sluggable_type", "Thredded::Topic"], ["messageboard_id", 29]]
D, [2016-08-12T09:16:45.994311 #5152] DEBUG -- : Thredded::Topic Exists (0.3ms) SELECT 1 AS one FROM "thredded_topics" WHERE "thredded_topics"."hash_id" = 'hash76' LIMIT 1
D, [2016-08-12T09:16:45.995868 #5152] DEBUG -- : Thredded::UserDetail Exists (0.3ms) SELECT 1 AS one FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = 100 LIMIT 1
D, [2016-08-12T09:16:45.996928 #5152] DEBUG -- : SQL (0.2ms) INSERT INTO "thredded_user_details" ("user_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["user_id", 100], ["created_at", "2016-08-12 09:16:45.996060"], ["updated_at", "2016-08-12 09:16:45.996060"]]
D, [2016-08-12T09:16:45.998518 #5152] DEBUG -- : SQL (0.3ms) INSERT INTO "thredded_topics" ("title", "hash_id", "user_id", "messageboard_id", "last_user_id", "moderation_state", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["title", "Judge me by my size, do you?"], ["hash_id", "hash76"], ["user_id", 100], ["messageboard_id", 29], ["last_user_id", 101], ["moderation_state", 0], ["slug", "judge-me-by-my-size-do-you"], ["created_at", "2016-08-12 09:16:45.997401"], ["updated_at", "2016-08-12 09:16:45.997401"]]
D, [2016-08-12T09:16:45.999492 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_messageboards" SET "topics_count" = COALESCE("topics_count", 0) + 1 WHERE "thredded_messageboards"."id" = $1 [["id", 29]]
D, [2016-08-12T09:16:46.000314 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_user_details" SET "topics_count" = COALESCE("topics_count", 0) + 1 WHERE "thredded_user_details"."id" = $1 [["id", 44]]
D, [2016-08-12T09:16:46.001710 #5152] DEBUG -- : FriendlyId::Slug Load (0.2ms) SELECT "friendly_id_slugs".* FROM "friendly_id_slugs" WHERE "friendly_id_slugs"."sluggable_id" = $1 AND "friendly_id_slugs"."sluggable_type" = $2 ORDER BY "friendly_id_slugs".id DESC LIMIT 1 [["sluggable_id", 26], ["sluggable_type", "Thredded::Topic"]]
D, [2016-08-12T09:16:46.002889 #5152] DEBUG -- : SQL (0.2ms) DELETE FROM "friendly_id_slugs" WHERE "friendly_id_slugs"."sluggable_id" = $1 AND "friendly_id_slugs"."sluggable_type" = $2 AND "friendly_id_slugs"."slug" = $3 AND "friendly_id_slugs"."scope" = $4 [["sluggable_id", 26], ["sluggable_type", "Thredded::Topic"], ["slug", "judge-me-by-my-size-do-you"], ["scope", "messageboard_id:29"]]
D, [2016-08-12T09:16:46.004623 #5152] DEBUG -- : SQL (0.2ms) INSERT INTO "friendly_id_slugs" ("sluggable_id", "sluggable_type", "slug", "scope", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["sluggable_id", 26], ["sluggable_type", "Thredded::Topic"], ["slug", "judge-me-by-my-size-do-you"], ["scope", "messageboard_id:29"], ["created_at", "2016-08-12 09:16:46.003879"]]
D, [2016-08-12T09:16:46.006423 #5152] DEBUG -- : SQL (0.3ms) UPDATE "thredded_messageboards" SET "updated_at" = '2016-08-12 09:16:46.005291' WHERE "thredded_messageboards"."id" = $1 [["id", 29]]
D, [2016-08-12T09:16:46.007492 #5152] DEBUG -- : SQL (0.3ms) UPDATE "thredded_messageboards" SET "last_topic_id" = 26 WHERE "thredded_messageboards"."id" = $1 [["id", 29]]
D, [2016-08-12T09:16:46.007837 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.010219 #5152] DEBUG -- :  (0.1ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.011058 #5152] DEBUG -- : Thredded::UserDetail Load (0.2ms) SELECT "thredded_user_details".* FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = $1 LIMIT 1 [["user_id", 100]]
D, [2016-08-12T09:16:46.012843 #5152] DEBUG -- : SQL (0.3ms) INSERT INTO "thredded_posts" ("user_id", "postable_id", "messageboard_id", "content", "ip", "created_at", "updated_at", "moderation_state") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["user_id", 100], ["postable_id", 26], ["messageboard_id", 29], ["content", "Programming the pixel won't do anything, we need to program the virtual xml interface!"], ["ip", "127.0.0.1"], ["created_at", "2016-08-12 08:16:45.997401"], ["updated_at", "2016-08-12 08:16:45.997401"], ["moderation_state", 0]]
D, [2016-08-12T09:16:46.013852 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_messageboards" SET "posts_count" = COALESCE("posts_count", 0) + 1 WHERE "thredded_messageboards"."id" = $1 [["id", 29]]
D, [2016-08-12T09:16:46.014901 #5152] DEBUG -- : SQL (0.4ms) UPDATE "thredded_topics" SET "posts_count" = COALESCE("posts_count", 0) + 1 WHERE "thredded_topics"."id" = $1 [["id", 26]]
D, [2016-08-12T09:16:46.015867 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_user_details" SET "posts_count" = COALESCE("posts_count", 0) + 1 WHERE "thredded_user_details"."id" = $1 [["id", 44]]
D, [2016-08-12T09:16:46.017042 #5152] DEBUG -- : Thredded::UserTopicFollow Load (0.2ms) SELECT "thredded_user_topic_follows".* FROM "thredded_user_topic_follows" WHERE "thredded_user_topic_follows"."user_id" = $1 AND "thredded_user_topic_follows"."topic_id" = $2 LIMIT 1 [["user_id", 100], ["topic_id", 26]]
D, [2016-08-12T09:16:46.018502 #5152] DEBUG -- : SQL (0.2ms) INSERT INTO "thredded_user_topic_follows" ("reason", "user_id", "topic_id", "created_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["reason", 1], ["user_id", 100], ["topic_id", 26], ["created_at", "2016-08-12 09:16:46.017758"]]
D, [2016-08-12T09:16:46.019477 #5152] DEBUG -- : Thredded::Post Load (0.2ms) SELECT "thredded_posts".* FROM "thredded_posts" WHERE "thredded_posts"."id" = $1 LIMIT 1 [["id", 22]]
D, [2016-08-12T09:16:46.022800 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 AND "thredded_messageboards"."id" = $2 ORDER BY "thredded_messageboards"."topics_count" DESC LIMIT 1 [["closed", "f"], ["id", 29]]
D, [2016-08-12T09:16:46.023933 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 100]]
D, [2016-08-12T09:16:46.024768 #5152] DEBUG -- : Thredded::Topic Load (0.2ms) SELECT "thredded_topics".* FROM "thredded_topics" WHERE "thredded_topics"."id" = $1 LIMIT 1 [["id", 26]]
D, [2016-08-12T09:16:46.026353 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "thredded_user_topic_follows" ON "users"."id" = "thredded_user_topic_follows"."user_id" WHERE "thredded_user_topic_follows"."topic_id" = $1 [["topic_id", 26]]
D, [2016-08-12T09:16:46.027743 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_topics" SET "last_user_id" = 100, "updated_at" = '2016-08-12 08:16:45.997401' WHERE "thredded_topics"."id" = $1 [["id", 26]]
D, [2016-08-12T09:16:46.028092 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.030341 #5152] DEBUG -- :  (0.1ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.031156 #5152] DEBUG -- : Thredded::UserDetail Load (0.3ms) SELECT "thredded_user_details".* FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = $1 LIMIT 1 [["user_id", 100]]
D, [2016-08-12T09:16:46.032980 #5152] DEBUG -- : SQL (0.4ms) INSERT INTO "thredded_posts" ("user_id", "postable_id", "messageboard_id", "content", "ip", "created_at", "updated_at", "moderation_state") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["user_id", 100], ["postable_id", 26], ["messageboard_id", 29], ["content", "Try to reboot the JSON interface, maybe it will compress the wireless bus!"], ["ip", "127.0.0.1"], ["created_at", "2016-08-12 09:16:45.997401"], ["updated_at", "2016-08-12 09:16:45.997401"], ["moderation_state", 0]]
D, [2016-08-12T09:16:46.033907 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_messageboards" SET "posts_count" = COALESCE("posts_count", 0) + 1 WHERE "thredded_messageboards"."id" = $1 [["id", 29]]
D, [2016-08-12T09:16:46.034935 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_topics" SET "posts_count" = COALESCE("posts_count", 0) + 1 WHERE "thredded_topics"."id" = $1 [["id", 26]]
D, [2016-08-12T09:16:46.035932 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_user_details" SET "posts_count" = COALESCE("posts_count", 0) + 1 WHERE "thredded_user_details"."id" = $1 [["id", 44]]
D, [2016-08-12T09:16:46.037116 #5152] DEBUG -- : Thredded::UserTopicFollow Load (0.3ms) SELECT "thredded_user_topic_follows".* FROM "thredded_user_topic_follows" WHERE "thredded_user_topic_follows"."user_id" = $1 AND "thredded_user_topic_follows"."topic_id" = $2 LIMIT 1 [["user_id", 100], ["topic_id", 26]]
D, [2016-08-12T09:16:46.037840 #5152] DEBUG -- : Thredded::Post Load (0.2ms) SELECT "thredded_posts".* FROM "thredded_posts" WHERE "thredded_posts"."id" = $1 LIMIT 1 [["id", 23]]
D, [2016-08-12T09:16:46.040857 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 AND "thredded_messageboards"."id" = $2 ORDER BY "thredded_messageboards"."topics_count" DESC LIMIT 1 [["closed", "f"], ["id", 29]]
D, [2016-08-12T09:16:46.041839 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 100]]
D, [2016-08-12T09:16:46.042705 #5152] DEBUG -- : Thredded::Topic Load (0.3ms) SELECT "thredded_topics".* FROM "thredded_topics" WHERE "thredded_topics"."id" = $1 LIMIT 1 [["id", 26]]
D, [2016-08-12T09:16:46.044163 #5152] DEBUG -- : User Load (0.3ms) SELECT "users".* FROM "users" INNER JOIN "thredded_user_topic_follows" ON "users"."id" = "thredded_user_topic_follows"."user_id" WHERE "thredded_user_topic_follows"."topic_id" = $1 [["topic_id", 26]]
D, [2016-08-12T09:16:46.045633 #5152] DEBUG -- : SQL (0.4ms) UPDATE "thredded_topics" SET "last_user_id" = 100, "updated_at" = '2016-08-12 09:16:45.997401' WHERE "thredded_topics"."id" = $1 [["id", 26]]
D, [2016-08-12T09:16:46.045933 #5152] DEBUG -- :  (0.1ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.046442 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.047579 #5152] DEBUG -- : Thredded::Topic Exists (0.3ms) SELECT 1 AS one FROM "thredded_topics" WHERE ("thredded_topics"."hash_id" = 'hash76' AND "thredded_topics"."id" != 26) LIMIT 1
D, [2016-08-12T09:16:46.048622 #5152] DEBUG -- : User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 100]]
D, [2016-08-12T09:16:46.050234 #5152] DEBUG -- : SQL (0.3ms) UPDATE "thredded_topics" SET "updated_at" = $1 WHERE "thredded_topics"."id" = $2 [["updated_at", "2016-08-12 09:16:46.049155"], ["id", 26]]
D, [2016-08-12T09:16:46.051512 #5152] DEBUG -- : FriendlyId::Slug Load (0.2ms) SELECT "friendly_id_slugs".* FROM "friendly_id_slugs" WHERE "friendly_id_slugs"."sluggable_id" = $1 AND "friendly_id_slugs"."sluggable_type" = $2 ORDER BY "friendly_id_slugs".id DESC LIMIT 1 [["sluggable_id", 26], ["sluggable_type", "Thredded::Topic"]]
D, [2016-08-12T09:16:46.053016 #5152] DEBUG -- : SQL (0.2ms) UPDATE "thredded_messageboards" SET "updated_at" = '2016-08-12 09:16:46.052039' WHERE "thredded_messageboards"."id" = $1 [["id", 29]]
D, [2016-08-12T09:16:46.053527 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.054299 #5152] DEBUG -- :  (0.1ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.055541 #5152] DEBUG -- : SQL (0.2ms) INSERT INTO "users" ("email", "name", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["email", "user222@example.com"], ["name", "joel"], ["created_at", "2016-08-12 09:16:46.054651"], ["updated_at", "2016-08-12 09:16:46.054651"]]
D, [2016-08-12T09:16:46.056121 #5152] DEBUG -- :  (0.1ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.078402 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = $1 LIMIT 1 [["name", "joel"]]
D, [2016-08-12T09:16:46.078937 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.080220 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.083290 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 ORDER BY "thredded_messageboards"."topics_count" DESC LIMIT 1 [["closed", "f"]]
D, [2016-08-12T09:16:46.104962 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 102]]
D, [2016-08-12T09:16:46.111756 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 AND "thredded_messageboards"."slug" = $2 ORDER BY "thredded_messageboards"."topics_count" DESC LIMIT 1 [["closed", "f"], ["slug", "messageboard93"]]
D, [2016-08-12T09:16:46.112487 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 102]]
D, [2016-08-12T09:16:46.113709 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 ORDER BY "thredded_messageboards"."topics_count" DESC [["closed", "f"]]
D, [2016-08-12T09:16:46.116725 #5152] DEBUG -- : Thredded::Topic Load (0.2ms) SELECT "thredded_topics".* FROM "thredded_topics" WHERE "thredded_topics"."messageboard_id" = $1 AND ("thredded_topics"."moderation_state" != 2 OR "thredded_topics"."user_id" = 102) ORDER BY "thredded_topics"."sticky" DESC, "thredded_topics"."updated_at" DESC, "thredded_topics"."id" DESC LIMIT 50 OFFSET 0 [["messageboard_id", 29]]
D, [2016-08-12T09:16:46.118192 #5152] DEBUG -- : Thredded::TopicCategory Load (0.3ms) SELECT "thredded_topic_categories".* FROM "thredded_topic_categories" WHERE "thredded_topic_categories"."topic_id" IN (26)
D, [2016-08-12T09:16:46.119764 #5152] DEBUG -- : User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (100)
D, [2016-08-12T09:16:46.120591 #5152] DEBUG -- : CACHE (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (100)
D, [2016-08-12T09:16:46.121629 #5152] DEBUG -- : Thredded::UserTopicReadState Load (0.2ms) SELECT "thredded_user_topic_read_states".* FROM "thredded_user_topic_read_states" WHERE "thredded_user_topic_read_states"."user_id" = $1 AND "thredded_user_topic_read_states"."postable_id" = 26 [["user_id", 102]]
D, [2016-08-12T09:16:46.122631 #5152] DEBUG -- : Thredded::UserTopicFollow Load (0.2ms) SELECT "thredded_user_topic_follows".* FROM "thredded_user_topic_follows" WHERE "thredded_user_topic_follows"."user_id" = $1 AND "thredded_user_topic_follows"."topic_id" = 26 [["user_id", 102]]
D, [2016-08-12T09:16:46.124488 #5152] DEBUG -- : CACHE (0.0ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 ORDER BY "thredded_messageboards"."topics_count" DESC [["closed", false]]
D, [2016-08-12T09:16:46.127709 #5152] DEBUG -- : Thredded::Category Exists (0.2ms) SELECT 1 AS one FROM "thredded_categories" WHERE "thredded_categories"."messageboard_id" = $1 LIMIT 1 [["messageboard_id", 29]]
D, [2016-08-12T09:16:46.134946 #5152] DEBUG -- :  (0.2ms) SELECT COUNT(*) FROM "thredded_topics" WHERE "thredded_topics"."messageboard_id" = $1 AND ("thredded_topics"."moderation_state" != 2 OR "thredded_topics"."user_id" = 102) [["messageboard_id", 29]]
D, [2016-08-12T09:16:46.140972 #5152] DEBUG -- :  (0.2ms) SELECT COUNT(DISTINCT "thredded_private_topics"."id") FROM "thredded_private_topics" INNER JOIN "thredded_private_users" ON "thredded_private_users"."private_topic_id" = "thredded_private_topics"."id" LEFT OUTER JOIN "thredded_user_private_topic_read_states" ON "thredded_private_topics"."id" = "thredded_user_private_topic_read_states"."postable_id" AND "thredded_user_private_topic_read_states"."user_id" = 102 WHERE "thredded_private_users"."user_id" = $1 AND ("thredded_user_private_topic_read_states"."id" IS NULL OR "thredded_user_private_topic_read_states"."read_at" < "thredded_private_topics"."updated_at") [["user_id", 102]]
D, [2016-08-12T09:16:46.144478 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "thredded_user_details" ON "users"."id" = "thredded_user_details"."user_id" INNER JOIN "thredded_messageboard_users" ON "thredded_user_details"."id" = "thredded_messageboard_users"."thredded_user_detail_id" WHERE "thredded_messageboard_users"."thredded_messageboard_id" = $1 AND ("thredded_messageboard_users"."last_seen_at" > '2016-08-12 09:11:46.142962') [["thredded_messageboard_id", 29]]
D, [2016-08-12T09:16:46.159610 #5152] DEBUG -- : Thredded::UserDetail Load (0.2ms) SELECT "thredded_user_details".* FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = $1 LIMIT 1 [["user_id", 102]]
D, [2016-08-12T09:16:46.160307 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.161553 #5152] DEBUG -- : Thredded::UserDetail Exists (0.3ms) SELECT 1 AS one FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = 102 LIMIT 1
D, [2016-08-12T09:16:46.162896 #5152] DEBUG -- : SQL (0.3ms) INSERT INTO "thredded_user_details" ("user_id", "last_seen_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["user_id", 102], ["last_seen_at", "2016-08-12 09:16:46.158925"], ["created_at", "2016-08-12 09:16:46.161811"], ["updated_at", "2016-08-12 09:16:46.161811"]]
D, [2016-08-12T09:16:46.163676 #5152] DEBUG -- :  (0.3ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.164397 #5152] DEBUG -- : Thredded::MessageboardUser Load (0.2ms) SELECT "thredded_messageboard_users".* FROM "thredded_messageboard_users" WHERE "thredded_messageboard_users"."thredded_messageboard_id" = $1 AND "thredded_messageboard_users"."thredded_user_detail_id" = $2 LIMIT 1 [["thredded_messageboard_id", 29], ["thredded_user_detail_id", 45]]
D, [2016-08-12T09:16:46.165115 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.166154 #5152] DEBUG -- : SQL (0.3ms) INSERT INTO "thredded_messageboard_users" ("thredded_messageboard_id", "thredded_user_detail_id", "last_seen_at") VALUES ($1, $2, $3) RETURNING "id" [["thredded_messageboard_id", 29], ["thredded_user_detail_id", 45], ["last_seen_at", "2016-08-12 09:16:46.158925"]]
D, [2016-08-12T09:16:46.166720 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.173419 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 AND "thredded_messageboards"."slug" = $2 ORDER BY "thredded_messageboards"."topics_count" DESC LIMIT 1 [["closed", "f"], ["slug", "messageboard93"]]
D, [2016-08-12T09:16:46.174958 #5152] DEBUG -- : Thredded::Topic Load (0.2ms) SELECT "thredded_topics".* FROM "thredded_topics" WHERE "thredded_topics"."messageboard_id" = $1 AND "thredded_topics"."slug" = $2 ORDER BY "thredded_topics"."id" ASC LIMIT 1 [["messageboard_id", 29], ["slug", "judge-me-by-my-size-do-you"]]
D, [2016-08-12T09:16:46.175714 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 102]]
D, [2016-08-12T09:16:46.176836 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 ORDER BY "thredded_messageboards"."topics_count" DESC [["closed", "f"]]
D, [2016-08-12T09:16:46.179657 #5152] DEBUG -- : Thredded::Post Load (0.2ms) SELECT "thredded_posts".* FROM "thredded_posts" WHERE "thredded_posts"."postable_id" = $1 AND ("thredded_posts"."moderation_state" != 2 OR "thredded_posts"."user_id" = 102) ORDER BY "thredded_posts"."created_at" ASC, "thredded_posts"."id" ASC LIMIT 50 OFFSET 0 [["postable_id", 26]]
D, [2016-08-12T09:16:46.180988 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (100)
D, [2016-08-12T09:16:46.182726 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 AND "thredded_messageboards"."id" IN (29) ORDER BY "thredded_messageboards"."topics_count" DESC [["closed", "f"]]
D, [2016-08-12T09:16:46.184166 #5152] DEBUG -- : Thredded::Topic Load (0.3ms) SELECT "thredded_topics".* FROM "thredded_topics" WHERE "thredded_topics"."id" IN (26)
D, [2016-08-12T09:16:46.185140 #5152] DEBUG -- : Thredded::UserTopicReadState Load (0.3ms) SELECT "thredded_user_topic_read_states".* FROM "thredded_user_topic_read_states" WHERE "thredded_user_topic_read_states"."user_id" = $1 AND "thredded_user_topic_read_states"."postable_id" = $2 LIMIT 1 [["user_id", 102], ["postable_id", 26]]
D, [2016-08-12T09:16:46.185664 #5152] DEBUG -- : Thredded::UserTopicFollow Load (0.2ms) SELECT "thredded_user_topic_follows".* FROM "thredded_user_topic_follows" WHERE "thredded_user_topic_follows"."user_id" = $1 AND "thredded_user_topic_follows"."topic_id" = $2 LIMIT 1 [["user_id", 102], ["topic_id", 26]]
D, [2016-08-12T09:16:46.186488 #5152] DEBUG -- : CACHE (0.0ms) SELECT "thredded_user_topic_read_states".* FROM "thredded_user_topic_read_states" WHERE "thredded_user_topic_read_states"."user_id" = $1 AND "thredded_user_topic_read_states"."postable_id" = $2 LIMIT 1 [["user_id", 102], ["postable_id", 26]]
D, [2016-08-12T09:16:46.187185 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.188282 #5152] DEBUG -- : Thredded::UserTopicReadState Exists (0.2ms) SELECT 1 AS one FROM "thredded_user_topic_read_states" WHERE ("thredded_user_topic_read_states"."user_id" = 102 AND "thredded_user_topic_read_states"."postable_id" = 26) LIMIT 1
D, [2016-08-12T09:16:46.189200 #5152] DEBUG -- : SQL (0.2ms) INSERT INTO "thredded_user_topic_read_states" ("user_id", "postable_id", "read_at") VALUES ($1, $2, $3) RETURNING "id" [["user_id", 102], ["postable_id", 26], ["read_at", "2016-08-12 09:16:45.997401"]]
D, [2016-08-12T09:16:46.189714 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.192993 #5152] DEBUG -- : Thredded::Category Load (0.2ms) SELECT "thredded_categories".* FROM "thredded_categories" INNER JOIN "thredded_topic_categories" ON "thredded_categories"."id" = "thredded_topic_categories"."category_id" WHERE "thredded_topic_categories"."topic_id" = $1 [["topic_id", 26]]
D, [2016-08-12T09:16:46.194605 #5152] DEBUG -- : User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 100]]
D, [2016-08-12T09:16:46.196547 #5152] DEBUG -- : Thredded::UserTopicFollow Load (0.2ms) SELECT "thredded_user_topic_follows".* FROM "thredded_user_topic_follows" WHERE "thredded_user_topic_follows"."topic_id" = $1 AND "thredded_user_topic_follows"."user_id" = 102 LIMIT 1 [["topic_id", 26]]
D, [2016-08-12T09:16:46.204789 #5152] DEBUG -- : Thredded::Post Load (0.2ms) SELECT "thredded_posts".* FROM "thredded_posts" WHERE "thredded_posts"."postable_id" = $1 ORDER BY "thredded_posts"."created_at" ASC, "thredded_posts"."id" ASC LIMIT 1 [["postable_id", 26]]
D, [2016-08-12T09:16:46.209406 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 ORDER BY "thredded_messageboards"."topics_count" DESC [["closed", "f"]]
D, [2016-08-12T09:16:46.212827 #5152] DEBUG -- :  (0.2ms) SELECT COUNT(*) FROM "thredded_posts" WHERE "thredded_posts"."postable_id" = $1 AND ("thredded_posts"."moderation_state" != 2 OR "thredded_posts"."user_id" = 102) [["postable_id", 26]]
D, [2016-08-12T09:16:46.218666 #5152] DEBUG -- :  (0.2ms) SELECT COUNT(DISTINCT "thredded_private_topics"."id") FROM "thredded_private_topics" INNER JOIN "thredded_private_users" ON "thredded_private_users"."private_topic_id" = "thredded_private_topics"."id" LEFT OUTER JOIN "thredded_user_private_topic_read_states" ON "thredded_private_topics"."id" = "thredded_user_private_topic_read_states"."postable_id" AND "thredded_user_private_topic_read_states"."user_id" = 102 WHERE "thredded_private_users"."user_id" = $1 AND ("thredded_user_private_topic_read_states"."id" IS NULL OR "thredded_user_private_topic_read_states"."read_at" < "thredded_private_topics"."updated_at") [["user_id", 102]]
D, [2016-08-12T09:16:46.222121 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "thredded_user_details" ON "users"."id" = "thredded_user_details"."user_id" INNER JOIN "thredded_messageboard_users" ON "thredded_user_details"."id" = "thredded_messageboard_users"."thredded_user_detail_id" WHERE "thredded_messageboard_users"."thredded_messageboard_id" = $1 AND ("thredded_messageboard_users"."last_seen_at" > '2016-08-12 09:11:46.220536') [["thredded_messageboard_id", 29]]
D, [2016-08-12T09:16:46.237128 #5152] DEBUG -- : Thredded::UserDetail Load (0.2ms) SELECT "thredded_user_details".* FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = $1 LIMIT 1 [["user_id", 102]]
D, [2016-08-12T09:16:46.237713 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.239208 #5152] DEBUG -- : Thredded::UserDetail Exists (0.3ms) SELECT 1 AS one FROM "thredded_user_details" WHERE ("thredded_user_details"."user_id" = 102 AND "thredded_user_details"."id" != 45) LIMIT 1
D, [2016-08-12T09:16:46.240528 #5152] DEBUG -- : SQL (0.3ms) UPDATE "thredded_user_details" SET "last_seen_at" = $1, "updated_at" = $2 WHERE "thredded_user_details"."id" = $3 [["last_seen_at", "2016-08-12 09:16:46.236450"], ["updated_at", "2016-08-12 09:16:46.239477"], ["id", 45]]
D, [2016-08-12T09:16:46.241092 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.241908 #5152] DEBUG -- : Thredded::MessageboardUser Load (0.3ms) SELECT "thredded_messageboard_users".* FROM "thredded_messageboard_users" WHERE "thredded_messageboard_users"."thredded_messageboard_id" = $1 AND "thredded_messageboard_users"."thredded_user_detail_id" = $2 LIMIT 1 [["thredded_messageboard_id", 29], ["thredded_user_detail_id", 45]]
D, [2016-08-12T09:16:46.242341 #5152] DEBUG -- :  (0.2ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.243647 #5152] DEBUG -- : SQL (0.3ms) UPDATE "thredded_messageboard_users" SET "last_seen_at" = $1 WHERE "thredded_messageboard_users"."id" = $2 [["last_seen_at", "2016-08-12 09:16:46.236450"], ["id", 11]]
D, [2016-08-12T09:16:46.244058 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.251340 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 AND "thredded_messageboards"."slug" = $2 ORDER BY "thredded_messageboards"."topics_count" DESC LIMIT 1 [["closed", "f"], ["slug", "messageboard93"]]
D, [2016-08-12T09:16:46.252018 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 102]]
D, [2016-08-12T09:16:46.253146 #5152] DEBUG -- : Thredded::Messageboard Load (0.2ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 ORDER BY "thredded_messageboards"."topics_count" DESC [["closed", "f"]]
D, [2016-08-12T09:16:46.255489 #5152] DEBUG -- : Thredded::Topic Load (0.2ms) SELECT "thredded_topics".* FROM "thredded_topics" WHERE "thredded_topics"."messageboard_id" = $1 AND ("thredded_topics"."moderation_state" != 2 OR "thredded_topics"."user_id" = 102) ORDER BY "thredded_topics"."sticky" DESC, "thredded_topics"."updated_at" DESC, "thredded_topics"."id" DESC LIMIT 50 OFFSET 0 [["messageboard_id", 29]]
D, [2016-08-12T09:16:46.257062 #5152] DEBUG -- : Thredded::TopicCategory Load (0.4ms) SELECT "thredded_topic_categories".* FROM "thredded_topic_categories" WHERE "thredded_topic_categories"."topic_id" IN (26)
D, [2016-08-12T09:16:46.258723 #5152] DEBUG -- : User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (100)
D, [2016-08-12T09:16:46.259520 #5152] DEBUG -- : CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (100)
D, [2016-08-12T09:16:46.260439 #5152] DEBUG -- : Thredded::UserTopicReadState Load (0.2ms) SELECT "thredded_user_topic_read_states".* FROM "thredded_user_topic_read_states" WHERE "thredded_user_topic_read_states"."user_id" = $1 AND "thredded_user_topic_read_states"."postable_id" = 26 [["user_id", 102]]
D, [2016-08-12T09:16:46.261374 #5152] DEBUG -- : Thredded::UserTopicFollow Load (0.2ms) SELECT "thredded_user_topic_follows".* FROM "thredded_user_topic_follows" WHERE "thredded_user_topic_follows"."user_id" = $1 AND "thredded_user_topic_follows"."topic_id" = 26 [["user_id", 102]]
D, [2016-08-12T09:16:46.263216 #5152] DEBUG -- : CACHE (0.0ms) SELECT "thredded_messageboards".* FROM "thredded_messageboards" WHERE "thredded_messageboards"."closed" = $1 ORDER BY "thredded_messageboards"."topics_count" DESC [["closed", false]]
D, [2016-08-12T09:16:46.266278 #5152] DEBUG -- : Thredded::Category Exists (0.2ms) SELECT 1 AS one FROM "thredded_categories" WHERE "thredded_categories"."messageboard_id" = $1 LIMIT 1 [["messageboard_id", 29]]
D, [2016-08-12T09:16:46.273420 #5152] DEBUG -- :  (0.2ms) SELECT COUNT(*) FROM "thredded_topics" WHERE "thredded_topics"."messageboard_id" = $1 AND ("thredded_topics"."moderation_state" != 2 OR "thredded_topics"."user_id" = 102) [["messageboard_id", 29]]
D, [2016-08-12T09:16:46.279118 #5152] DEBUG -- :  (0.2ms) SELECT COUNT(DISTINCT "thredded_private_topics"."id") FROM "thredded_private_topics" INNER JOIN "thredded_private_users" ON "thredded_private_users"."private_topic_id" = "thredded_private_topics"."id" LEFT OUTER JOIN "thredded_user_private_topic_read_states" ON "thredded_private_topics"."id" = "thredded_user_private_topic_read_states"."postable_id" AND "thredded_user_private_topic_read_states"."user_id" = 102 WHERE "thredded_private_users"."user_id" = $1 AND ("thredded_user_private_topic_read_states"."id" IS NULL OR "thredded_user_private_topic_read_states"."read_at" < "thredded_private_topics"."updated_at") [["user_id", 102]]
D, [2016-08-12T09:16:46.282722 #5152] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "thredded_user_details" ON "users"."id" = "thredded_user_details"."user_id" INNER JOIN "thredded_messageboard_users" ON "thredded_user_details"."id" = "thredded_messageboard_users"."thredded_user_detail_id" WHERE "thredded_messageboard_users"."thredded_messageboard_id" = $1 AND ("thredded_messageboard_users"."last_seen_at" > '2016-08-12 09:11:46.280997') [["thredded_messageboard_id", 29]]
D, [2016-08-12T09:16:46.298228 #5152] DEBUG -- : Thredded::UserDetail Load (0.3ms) SELECT "thredded_user_details".* FROM "thredded_user_details" WHERE "thredded_user_details"."user_id" = $1 LIMIT 1 [["user_id", 102]]
D, [2016-08-12T09:16:46.298812 #5152] DEBUG -- :  (0.3ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.300238 #5152] DEBUG -- : Thredded::UserDetail Exists (0.4ms) SELECT 1 AS one FROM "thredded_user_details" WHERE ("thredded_user_details"."user_id" = 102 AND "thredded_user_details"."id" != 45) LIMIT 1
D, [2016-08-12T09:16:46.301716 #5152] DEBUG -- : SQL (0.5ms) UPDATE "thredded_user_details" SET "last_seen_at" = $1, "updated_at" = $2 WHERE "thredded_user_details"."id" = $3 [["last_seen_at", "2016-08-12 09:16:46.297537"], ["updated_at", "2016-08-12 09:16:46.300502"], ["id", 45]]
D, [2016-08-12T09:16:46.302360 #5152] DEBUG -- :  (0.2ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.303089 #5152] DEBUG -- : Thredded::MessageboardUser Load (0.2ms) SELECT "thredded_messageboard_users".* FROM "thredded_messageboard_users" WHERE "thredded_messageboard_users"."thredded_messageboard_id" = $1 AND "thredded_messageboard_users"."thredded_user_detail_id" = $2 LIMIT 1 [["thredded_messageboard_id", 29], ["thredded_user_detail_id", 45]]
D, [2016-08-12T09:16:46.303523 #5152] DEBUG -- :  (0.1ms) SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.304871 #5152] DEBUG -- : SQL (0.3ms) UPDATE "thredded_messageboard_users" SET "last_seen_at" = $1 WHERE "thredded_messageboard_users"."id" = $2 [["last_seen_at", "2016-08-12 09:16:46.297537"], ["id", 11]]
D, [2016-08-12T09:16:46.305311 #5152] DEBUG -- :  (0.1ms) RELEASE SAVEPOINT active_record_1
D, [2016-08-12T09:16:46.328924 #5152] DEBUG -- :  (0.2ms) ROLLBACK
 sees that a previously read topic is read (FAILED - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment