{"action":"created","issue":{"url":"https://api.github.com/repos/hurtom/toloka/issues/109","repository_url":"https://api.github.com/repos/hurtom/toloka","labels_url":"https://api.github.com/repos/hurtom/toloka/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/hurtom/toloka/issues/109/comments","events_url":"https://api.github.com/repos/hurtom/toloka/issues/109/events","html_url":"https://github.com/hurtom/toloka/issues/109","id":247954442,"number":109,"title":"Анонсер - Ocelot, XBTT тощо","user":{"login":"yukoff","id":1076681,"avatar_url":"https://avatars2.githubusercontent.com/u/1076681?v=4","gravatar_id":"","url":"https://api.github.com/users/yukoff","html_url":"https://github.com/yukoff","followers_url":"https://api.github.com/users/yukoff/followers","following_url":"https://api.github.com/users/yukoff/following{/other_user}","gists_url":"https://api.github.com/users/yukoff/gists{/gist_id}","starred_url":"https://api.github.com/users/yukoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukoff/subscriptions","organizations_url":"https://api.github.com/users/yukoff/orgs","repos_url":"https://api.github.com/users/yukoff/repos","events_url":"https://api.github.com/users/yukoff/events{/privacy}","received_events_url":"https://api.github.com/users/yukoff/received_events","type":"User","site_admin":false},"labels":[{"id":632732056,"url":"https://api.github.com/repos/hurtom/toloka/labels/backend","name":"backend","color":"0052cc","default":false},{"id":647737717,"url":"https://api.github.com/repos/hurtom/toloka/labels/discuss","name":"discuss","color":"c2e0c6","default":false},{"id":614308264,"url":"https://api.github.com/repos/hurtom/toloka/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":648250553,"url":"https://api.github.com/repos/hurtom/toloka/labels/future","name":"future","color":"e102d8","default":false}],"state":"open","locked":false,"assignee":{"login":"yukoff","id":1076681,"avatar_url":"https://avatars2.githubusercontent.com/u/1076681?v=4","gravatar_id":"","url":"https://api.github.com/users/yukoff","html_url":"https://github.com/yukoff","followers_url":"https://api.github.com/users/yukoff/followers","following_url":"https://api.github.com/users/yukoff/following{/other_user}","gists_url":"https://api.github.com/users/yukoff/gists{/gist_id}","starred_url":"https://api.github.com/users/yukoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukoff/subscriptions","organizations_url":"https://api.github.com/users/yukoff/orgs","repos_url":"https://api.github.com/users/yukoff/repos","events_url":"https://api.github.com/users/yukoff/events{/privacy}","received_events_url":"https://api.github.com/users/yukoff/received_events","type":"User","site_admin":false},"assignees":[{"login":"yukoff","id":1076681,"avatar_url":"https://avatars2.githubusercontent.com/u/1076681?v=4","gravatar_id":"","url":"https://api.github.com/users/yukoff","html_url":"https://github.com/yukoff","followers_url":"https://api.github.com/users/yukoff/followers","following_url":"https://api.github.com/users/yukoff/following{/other_user}","gists_url":"https://api.github.com/users/yukoff/gists{/gist_id}","starred_url":"https://api.github.com/users/yukoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukoff/subscriptions","organizations_url":"https://api.github.com/users/yukoff/orgs","repos_url":"https://api.github.com/users/yukoff/repos","events_url":"https://api.github.com/users/yukoff/events{/privacy}","received_events_url":"https://api.github.com/users/yukoff/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2017-08-04T09:39:28Z","updated_at":"2017-08-07T09:02:57Z","closed_at":null,"body":"Передісторія [тут](/hurtom/toloka/issues/96#issuecomment-320178298):\r\n> в старій базі тригер (`bb_topics_au`) вставляв дані в цю (`bb_bt_torrents_del`) таблицю:\r\n```sql\r\nDELIMITER $$\r\nCREATE TRIGGER `bb_topics_au` AFTER UPDATE ON `bb_topics`\r\n FOR EACH ROW if new.topic_type_gold != old.topic_type_gold then\r\n    insert into bb_bt_torrents_del (torrent_id,info_hash,is_del,dl_percent)\r\n    select torrent_id,info_hash,0\r\n    ,case new.topic_type_gold when 1 then 0 when 2 then 50 when 3 then 75 when 4 then -1 else 100 end\r\n    from bb_bt_torrents t where t.topic_id=new.topic_id\r\n    ON DUPLICATE KEY UPDATE dl_percent=values(dl_percent);\r\n  end if\r\n$$\r\nDELIMITER ;\r\n```\r\nта [тут](/hurtom/toloka/issues/96#issuecomment-320202728):\r\n> Ця логіка (таблиця + тригер) потрібна для анонсера XBTT, який більше не підтримується апстрімом. Для спрощення, ми почнемо з використання стандартного анонсера на PHP, потім можливо перейдемо або на Ocelot, або на XBTT.\r\n>\r\n> Тобто, поки що дропаємо таблицю і тригер, можливо повернемося до них пізніше."},"comment":{"url":"https://api.github.com/repos/hurtom/toloka/issues/comments/320609992","html_url":"https://github.com/hurtom/toloka/issues/109#issuecomment-320609992","issue_url":"https://api.github.com/repos/hurtom/toloka/issues/109","id":320609992,"user":{"login":"konfuciusu","id":28990255,"avatar_url":"https://avatars1.githubusercontent.com/u/28990255?v=4","gravatar_id":"","url":"https://api.github.com/users/konfuciusu","html_url":"https://github.com/konfuciusu","followers_url":"https://api.github.com/users/konfuciusu/followers","following_url":"https://api.github.com/users/konfuciusu/following{/other_user}","gists_url":"https://api.github.com/users/konfuciusu/gists{/gist_id}","starred_url":"https://api.github.com/users/konfuciusu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konfuciusu/subscriptions","organizations_url":"https://api.github.com/users/konfuciusu/orgs","repos_url":"https://api.github.com/users/konfuciusu/repos","events_url":"https://api.github.com/users/konfuciusu/events{/privacy}","received_events_url":"https://api.github.com/users/konfuciusu/received_events","type":"User","site_admin":false},"created_at":"2017-08-07T09:02:57Z","updated_at":"2017-08-07T09:02:57Z","body":"Якщо говорити про швидкість, ось свіжа статистика XBTT:\r\nпірів: 200 тис\r\ncpu: 2%\r\nmem: 270 MB\r\n\r\nдані зберігаються в пам'яті і періодично (120 - 150 с) скидаються одним великим запитом в базу, якмй триває до 0,5 с."}}
{"actor":{"display_login":"konfuciusu"}}