Advertisement
alewtina

Untitled

Dec 23rd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.69 KB | None | 0 0
  1. Started POST "/client/subordinates/6343/user_instruction_refs" for ::1 at 2016-12-23 13:33:54 +0500
  2. Processing by Client::UserInstructionRefsController#create as HTML
  3. Parameters: {"utf8"=>"✓", "authenticity_token"=>"nKZZ3wbffRXoPmhuo36MPW+6WfCPZYG0vOMcExZXycSmcX9n28U7br623wetVIzpuXSyX5AHny41xMbO2r2/AA==", "user_instruction_ref"=>{"instruction_id"=>"394", "type"=>"instruct", "instruction_type"=>"first", "upcoming_session_attributes"=>{"allowed_period_start(3i)"=>"23", "allowed_period_start(2i)"=>"12", "allowed_period_start(1i)"=>"2016", "allowed_period_end(3i)"=>"", "allowed_period_end(2i)"=>"", "allowed_period_end(1i)"=>""}}, "commit"=>"Сохранить", "subordinate_id"=>"6343"}
  4. User Load (0.5ms) SELECT `model_people`.* FROM `model_people` WHERE `model_people`.`id` = 83 ORDER BY `model_people`.`id` ASC LIMIT 1
  5. ActiveSession Load (0.5ms) SELECT `model_sessions`.* FROM `model_sessions` WHERE `model_sessions`.`status` = 'run' AND `model_sessions`.`user_id` = 83 ORDER BY IF(model_sessions.status='upcoming', model_sessions.allowed_period_start, FROM_UNIXTIME(model_sessions.time_end)) DESC LIMIT 1
  6. ActiveSession Load (0.4ms) SELECT `model_sessions`.* FROM `model_sessions` WHERE `model_sessions`.`status` = 'run' AND `model_sessions`.`head_user_id` = 83 ORDER BY IF(model_sessions.status='upcoming', model_sessions.allowed_period_start, FROM_UNIXTIME(model_sessions.time_end)) DESC LIMIT 1
  7. User Load (0.4ms) SELECT `model_people`.* FROM `model_people` WHERE `model_people`.`id` = 6343 LIMIT 1
  8. (0.5ms) SELECT `model_module`.id FROM `model_module` INNER JOIN `model_program` ON `model_program`.`id` = `model_module`.`program_item_id` INNER JOIN `users_courses` ON `model_module`.`id` = `users_courses`.`course_id` WHERE `users_courses`.`user_id` = 83 ORDER BY model_program.lft, model_module.order
  9. Program Load (0.3ms) SELECT `model_program`.* FROM `model_program` WHERE `model_program`.`machine_name` = 'instructions' ORDER BY `model_program`.`lft` ASC LIMIT 1
  10. (0.3ms) SELECT `model_module`.id FROM `model_module` INNER JOIN `model_program` ON `model_program`.`id` = `model_module`.`program_item_id` INNER JOIN `model_user_instruction_reference` ON `model_module`.`id` = `model_user_instruction_reference`.`instruction_id` WHERE (model_program.lft>=90 AND model_program.rgt<=95) AND `model_user_instruction_reference`.`user_id` = 83 ORDER BY model_program.lft, model_module.order, `model_user_instruction_reference`.`id` DESC
  11. (0.3ms) SELECT DISTINCT `model_program`.id FROM `model_program` INNER JOIN `model_module` ON `model_program`.`id` = `model_module`.`program_item_id` INNER JOIN `users_courses` ON `model_module`.`id` = `users_courses`.`course_id` WHERE `users_courses`.`user_id` = 83 ORDER BY model_program.lft
  12. Department Load (0.4ms) SELECT `model_department`.* FROM `model_department` WHERE `model_department`.`head_id` = 83 ORDER BY `model_department`.`lft` ASC LIMIT 1
  13. CACHE (0.0ms) SELECT `model_program`.* FROM `model_program` WHERE `model_program`.`machine_name` = 'instructions' ORDER BY `model_program`.`lft` ASC LIMIT 1 [["machine_name", "instructions"]]
  14. (0.6ms) SELECT `model_module`.`id` FROM `model_module` INNER JOIN `model_program` ON `model_program`.`id` = `model_module`.`program_item_id` LEFT OUTER JOIN `modules_customer_companies` ON `modules_customer_companies`.`program_id` = `model_module`.`id` LEFT OUTER JOIN `model_companies` ON `model_companies`.`company_id` = `modules_customer_companies`.`customer_company_id` WHERE (model_program.lft>=90 AND model_program.rgt<=95) AND `model_companies`.`company_id` = 6 ORDER BY model_program.lft, model_module.order
  15. (0.2ms) SELECT `model_people`.`id` FROM `model_people` WHERE `model_people`.`department_id` = 51
  16. CACHE (0.0ms) SELECT `model_program`.* FROM `model_program` WHERE `model_program`.`machine_name` = 'instructions' ORDER BY `model_program`.`lft` ASC LIMIT 1 [["machine_name", "instructions"]]
  17. CACHE (0.0ms) SELECT `model_program`.* FROM `model_program` WHERE `model_program`.`machine_name` = 'instructions' ORDER BY `model_program`.`lft` ASC LIMIT 1 [["machine_name", "instructions"]]
  18. SQL (1.1ms) SELECT `model_module`.`id` AS t0_r0, `model_module`.`program_item_id` AS t0_r1, `model_module`.`code` AS t0_r2, `model_module`.`title` AS t0_r3, `model_module`.`instruction_type` AS t0_r4, `model_module`.`hours` AS t0_r5, `model_module`.`attest_periodicity` AS t0_r6, `model_module`.`expandable` AS t0_r7, `model_module`.`canceled` AS t0_r8, `model_module`.`cancel_reason` AS t0_r9, `model_module`.`order` AS t0_r10, `model_module`.`author_id` AS t0_r11, `model_module`.`timestamp` AS t0_r12, `model_program`.`id` AS t1_r0, `model_program`.`parent_id` AS t1_r1, `model_program`.`code` AS t1_r2, `model_program`.`title` AS t1_r3, `model_program`.`machine_name` AS t1_r4, `model_program`.`hours` AS t1_r5, `model_program`.`lft` AS t1_r6, `model_program`.`rgt` AS t1_r7, `model_program`.`level` AS t1_r8, `model_program`.`depth` AS t1_r9 FROM `model_module` INNER JOIN `model_program` ON `model_program`.`id` = `model_module`.`program_item_id` WHERE (model_program.lft>=90 AND model_program.rgt<=95) AND `model_module`.`id` = 394 ORDER BY model_program.lft, model_module.order LIMIT 1
  19. (0.2ms) BEGIN
  20. SQL (0.5ms) INSERT INTO `model_sessions` (`allowed_period_start`, `mode`, `status`, `finished`, `user_id`, `head_user_id`, `instruction_id`, `program_item_id`, `program_code`, `program_title`) VALUES ('2016-12-23', 'attestation', 'upcoming', 0, 6343, 83, 394, 2571, 'И.2.', 'Первичный (повторный) инструктаж на рабочем месте для газорезчика')
  21. SQL (0.2ms) INSERT INTO `model_user_instruction_reference` (`instruction_id`, `type`, `instruction_type`, `user_id`, `session_id`) VALUES (394, 'instruct', 'first', 6343, 231070)
  22. (19.0ms) COMMIT
  23. SQL (42.1ms) UPDATE `model_sessions` SET `model_sessions`.`user_attest_last` = 0 WHERE `model_sessions`.`user_id` = 6343 AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_sessions`.`program_item_id` = 2571 ORDER BY IF(model_sessions.status='upcoming', model_sessions.allowed_period_start, FROM_UNIXTIME(model_sessions.time_end)) DESC
  24. Session Load (0.7ms) SELECT `model_sessions`.* FROM `model_sessions` WHERE `model_sessions`.`user_id` = 6343 AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_sessions`.`program_item_id` = 2571 ORDER BY IF(model_sessions.status='upcoming', model_sessions.allowed_period_start, FROM_UNIXTIME(model_sessions.time_end)) DESC LIMIT 1
  25. Program Load (0.3ms) SELECT `model_program`.* FROM `model_program` WHERE `model_program`.`id` IN (2571) ORDER BY `model_program`.`lft` ASC
  26. SQL (0.7ms) UPDATE `model_sessions` SET `model_sessions`.`user_attest_last` = 1 WHERE `model_sessions`.`id` = 231054
  27. UserInstructionRef Load (0.4ms) SELECT `model_user_instruction_reference`.* FROM `model_user_instruction_reference` WHERE `model_user_instruction_reference`.`session_id` = 231070 ORDER BY `model_user_instruction_reference`.`id` DESC LIMIT 1
  28. Session Exists (0.8ms) SELECT 1 AS one FROM `model_sessions` INNER JOIN `model_user_instruction_reference` ON `model_user_instruction_reference`.`session_id` = `model_sessions`.`id` LEFT OUTER JOIN `model_program` ON `model_program`.`id` = `model_sessions`.`program_item_id` WHERE `model_sessions`.`user_id` = 6343 AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_user_instruction_reference`.`type` = 'instruct' AND `model_user_instruction_reference`.`instruction_type` = 'first' LIMIT 1
  29. SQL (8721.1ms) UPDATE `model_sessions` SET `model_sessions`.`user_instruction_last` = 0 WHERE `model_sessions`.`id` IN (SELECT id FROM (SELECT `model_sessions`.`id` FROM `model_sessions` INNER JOIN `model_user_instruction_reference` ON `model_user_instruction_reference`.`session_id` = `model_sessions`.`id` WHERE `model_sessions`.`user_id` = 6343 AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_user_instruction_reference`.`type` = 'instruct' AND `model_user_instruction_reference`.`instruction_type` = 'first' ORDER BY IF(model_sessions.status='upcoming', model_sessions.allowed_period_start, FROM_UNIXTIME(model_sessions.time_end)) DESC) __active_record_temp)
  30. Session Load (0.7ms) SELECT `model_sessions`.* FROM `model_sessions` INNER JOIN `model_user_instruction_reference` ON `model_user_instruction_reference`.`session_id` = `model_sessions`.`id` WHERE `model_sessions`.`user_id` = 6343 AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_sessions`.`mode` = 'attestation' AND `model_sessions`.`status` IN ('upcoming', 'failed', 'passed', 'run') AND `model_user_instruction_reference`.`type` = 'instruct' AND `model_user_instruction_reference`.`instruction_type` = 'first' ORDER BY IF(model_sessions.status='upcoming', model_sessions.allowed_period_start, FROM_UNIXTIME(model_sessions.time_end)) DESC LIMIT 1
  31. Program Load (0.3ms) SELECT `model_program`.* FROM `model_program` WHERE `model_program`.`id` IN (2571) ORDER BY `model_program`.`lft` ASC
  32. SQL (0.9ms) UPDATE `model_sessions` SET `model_sessions`.`user_instruction_last` = 1 WHERE `model_sessions`.`id` = 231070
  33. Redirected to http://localhost:3000/client/subordinates/6343
  34. Completed 302 Found in 8872ms (ActiveRecord: 8793.5ms)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement