select * from indexation_server where `id` = "2" limit 1 SELECT `id` FROM `indexation_control` WHERE `type` = "1" and `status` = "1" and `list_id` = "2" LIMIT 1 INSERT INTO `indexation_control` (`type`, `list_id`, `server`, `action`, `status`, `start_time`, `last_action_ad`) VALUES ("1", "2", "index-ad","0", "1", "1500583424", "1500583424") select * from indexation_server where `id` = "2" limit 1 SELECT action FROM indexation_control WHERE id = "60" and status = "1" LIMIT 1 SHOW PROCESSLIST select count(id) from img_download where status = "2" and last_attempt > 1500583424 - 15 and stream_id = "60" SELECT `id`, `url`, `ad`, `source_name`, `crop_img`, `height_img`, `name` FROM `img_download` where (status = "0" or (status = "2" and last_attempt < 1500583424 - 15)) and attempts < "1" and addition_time >= 1500583424 - 86400 and last_attempt <= 1500583424 - 5 order by addition_time DESC, id DESC limit 25 UPDATE img_download SET attempts = attempts + 1, last_attempt = "1500583424", status = "2", stream_id = "60", number_select = "0" WHERE `id` IN(54968,54967,54966,54965,54964,54963,54962,54961,54960,54959,54958,54957,54956,54955,54954,54953,54952,54951,54950,54949,54948,54947,54946,54945,54944) UPDATE `indexation_control` SET `img_check` = img_check + 25, `last_action_ad` = '1500583424' WHERE id = '60' LIMIT 1 SELECT action FROM indexation_control WHERE id = "60" and status = "1" LIMIT 1 SHOW PROCESSLIST SHOW PROCESSLIST SHOW PROCESSLIST select count(id) from img_download where status = "2" and last_attempt > 1500583435 - 15 and stream_id = "60" SELECT `id`, `url`, `ad`, `source_name`, `crop_img`, `height_img`, `name` FROM `img_download` where (status = "0" or (status = "2" and last_attempt < 1500583435 - 15)) and attempts < "1" and addition_time >= 1500583435 - 86400 and last_attempt <= 1500583435 - 5 order by addition_time DESC, id DESC limit 25 UPDATE img_download SET attempts = attempts + 1, last_attempt = "1500583435", status = "2", stream_id = "60", number_select = "1" WHERE `id` IN(54943,54942,54941,54940,54939,54938,54937,54936,54935,54934,54933,54932,54931,54930,54929,54928,54927,54926,54925,54924,54923,54922,54921,54920,54919) UPDATE `indexation_control` SET `img_check` = img_check + 25, `last_action_ad` = '1500583435' WHERE id = '60' LIMIT 1 SELECT action FROM indexation_control WHERE id = "60" and status = "1" LIMIT 1 SHOW PROCESSLIST SHOW PROCESSLIST select count(id) from img_download where status = "2" and last_attempt > 1500583441 - 15 and stream_id = "60" SELECT `id`, `url`, `ad`, `source_name`, `crop_img`, `height_img`, `name` FROM `img_download` where (status = "0" or (status = "2" and last_attempt < 1500583441 - 15)) and attempts < "1" and addition_time >= 1500583441 - 86400 and last_attempt <= 1500583441 - 5 order by addition_time DESC, id DESC limit 25 UPDATE img_download SET attempts = attempts + 1, last_attempt = "1500583441", status = "2", stream_id = "60", number_select = "2" WHERE `id` IN(54918,54917,54916,54915,54914,54913,54912,54911,54910,54909,54908,54907,54906,54905,54904,54903,54902,54901,54900,54899,54898,54897,54896,54895,54894) UPDATE `indexation_control` SET `img_check` = img_check + 25, `last_action_ad` = '1500583441' WHERE id = '60' LIMIT 1 SELECT action FROM indexation_control WHERE id = "60" and status = "1" LIMIT 1 SHOW PROCESSLIST SHOW PROCESSLIST select count(id) from img_download where status = "2" and last_attempt > 1500583447 - 15 and stream_id = "60" SELECT `id`, `url`, `ad`, `source_name`, `crop_img`, `height_img`, `name` FROM `img_download` where (status = "0" or (status = "2" and last_attempt < 1500583447 - 15)) and attempts < "1" and addition_time >= 1500583447 - 86400 and last_attempt <= 1500583447 - 5 order by addition_time DESC, id DESC limit 25 UPDATE img_download SET attempts = attempts + 1, last_attempt = "1500583447", status = "2", stream_id = "60", number_select = "3" WHERE `id` IN(54893,54892,54891,54890,54889,54888,54887,54886,54885,54884,54883,54882,54881,54880,54879,54878,54877,54876,54875,54874,54873,54872,54871,54870,54869) UPDATE `indexation_control` SET `img_check` = img_check + 25, `last_action_ad` = '1500583447' WHERE id = '60' LIMIT 1 SELECT action FROM indexation_control WHERE id = "60" and status = "1" LIMIT 1 SELECT action FROM indexation_control WHERE id = "60" and status = "1" LIMIT 1 UPDATE indexation_control SET `status` = '0', last_action_ad = '1500583458' WHERE id = '60' and status = '1' LIMIT 1