Skip to content

Instantly share code, notes, and snippets.

@wjordan
Created May 19, 2017 21:12
Show Gist options
  • Save wjordan/290a144454005c3c31c58f286ced3ba8 to your computer and use it in GitHub Desktop.
Save wjordan/290a144454005c3c31c58f286ced3ba8 to your computer and use it in GitHub Desktop.
Started POST "/milestone/0/3021" for 127.0.0.1 at 2017-05-19 14:09:16 -0700
Processing by ActivitiesController#milestone as HTML
Parameters: {"lines"=>"20", "attempt"=>"1", "result"=>"true", "testResult"=>"100", "time"=>"1000", "app"=>"test", "program"=>"<hey>", "user_id"=>"0", "script_level_id"=>"3021"}
User Load (0.4ms) SELECT `users`.* FROM `users` WHERE `users`.`deleted_at` IS NULL AND `users`.`id` = 944 ORDER BY `users`.`id` ASC LIMIT 1
Query Trace > app/controllers/application_controller.rb:227:in `current_user'
from app/controllers/activities_controller.rb:72:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
from app/controllers/application_controller.rb:142:in `with_locale'
(0.4ms) SELECT `user_permissions`.`permission` FROM `user_permissions` WHERE `user_permissions`.`user_id` = 944
Query Trace > app/models/user.rb:226:in `permission?'
from app/models/user.rb:734:in `authorized_teacher?'
from app/controllers/activities_controller.rb:72:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
from app/controllers/application_controller.rb:142:in `with_locale'
District Load (0.3ms) SELECT `districts`.* FROM `districts` WHERE `districts`.`contact_id` = 944 LIMIT 1
Query Trace > app/models/user.rb:242:in `district_contact?'
from app/models/ability.rb:100:in `initialize'
from app/controllers/activities_controller.rb:154:in `track_progress_for_user'
from app/controllers/activities_controller.rb:103:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
SQL (0.2ms) INSERT INTO `activities` (`user_id`, `level_id`, `action`, `created_at`, `updated_at`, `attempt`, `time`, `test_result`, `level_source_id`, `lines`) VALUES (944, 742222515, '1', '2017-05-19 21:09:16', '2017-05-19 21:09:16', 1, 1000, 100, 2227, 20)
Query Trace > app/models/activity.rb:76:in `handle_async_op'
from app/models/activity.rb:61:in `create_async!'
from app/controllers/activities_controller.rb:184:in `track_progress_for_user'
from app/controllers/activities_controller.rb:103:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
UserLevel Load (0.4ms) SELECT `user_levels`.* FROM `user_levels` WHERE `user_levels`.`user_id` = 944 AND `user_levels`.`level_id` = 742222515 AND `user_levels`.`script_id` = 63 ORDER BY `user_levels`.`id` ASC LIMIT 1
Query Trace > app/models/user.rb:1017:in `track_level_progress_async'
from app/controllers/activities_controller.rb:198:in `track_progress_for_user'
from app/controllers/activities_controller.rb:103:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
from app/controllers/application_controller.rb:142:in `with_locale'
CACHE (0.0ms) SELECT `user_levels`.* FROM `user_levels` WHERE `user_levels`.`user_id` = 944 AND `user_levels`.`level_id` = 742222515 AND `user_levels`.`script_id` = 63 ORDER BY `user_levels`.`id` ASC LIMIT 1 [["user_id", 944], ["level_id", 742222515], ["script_id", 63], ["LIMIT", 1]]
Query Trace > app/models/user.rb:1049:in `block in track_level_progress_sync'
from app/models/user.rb:1046:in `track_level_progress_sync'
from app/models/user.rb:1123:in `handle_async_op'
from app/models/user.rb:1033:in `track_level_progress_async'
from app/controllers/activities_controller.rb:198:in `track_progress_for_user'
SQL (0.4ms) UPDATE `users` SET `users`.`total_lines` = 40 WHERE `users`.`deleted_at` IS NULL AND `users`.`id` = 944
Query Trace > app/controllers/activities_controller.rb:213:in `track_progress_for_user'
from app/controllers/activities_controller.rb:103:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
from app/controllers/application_controller.rb:142:in `with_locale'
Section Load (0.4ms) SELECT `sections`.* FROM `sections` INNER JOIN `followers` ON `sections`.`id` = `followers`.`section_id` WHERE `sections`.`deleted_at` IS NULL AND `followers`.`deleted_at` IS NULL AND `followers`.`student_user_id` = 944 ORDER BY followers.id
Query Trace > app/models/user.rb:707:in `hidden_stage?'
from app/models/script_level.rb:154:in `locked_or_hidden?'
from app/models/script_level.rb:148:in `valid_progression_level?'
from app/models/script_level.rb:98:in `next_level_or_redirect_path_for_user'
from app/helpers/script_levels_helper.rb:3:in `script_level_solved_response'
(0.3ms) SELECT `hint_view_requests`.`feedback_type`, `hint_view_requests`.`feedback_xml` FROM `hint_view_requests` WHERE `hint_view_requests`.`user_id` = 944 AND `hint_view_requests`.`script_id` = 63 AND `hint_view_requests`.`level_id` = 742222515
Query Trace > app/models/hint_view_request.rb:45:in `milestone_response'
from app/controllers/application_controller.rb:188:in `milestone_response'
from app/controllers/activities_controller.rb:119:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
from app/controllers/application_controller.rb:142:in `with_locale'
PuzzleRating Exists (0.2ms) SELECT 1 AS one FROM `puzzle_ratings` WHERE `puzzle_ratings`.`script_id` = 63 AND `puzzle_ratings`.`level_id` = 742222515 AND `puzzle_ratings`.`user_id` = 944 LIMIT 1
Query Trace > app/models/puzzle_rating.rb:46:in `can_rate?'
from app/controllers/application_controller.rb:194:in `milestone_response'
from app/controllers/activities_controller.rb:119:in `milestone'
from app/controllers/application_controller.rb:143:in `block in with_locale'
from app/controllers/application_controller.rb:142:in `with_locale'
Completed 200 OK in 51ms (Views: 0.6ms | ActiveRecord: 3.0ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment