{"action":"created","issue":{"url":"https://api.github.com/repos/meumobi/sitebuilder/issues/81","labels_url":"https://api.github.com/repos/meumobi/sitebuilder/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/meumobi/sitebuilder/issues/81/comments","events_url":"https://api.github.com/repos/meumobi/sitebuilder/issues/81/events","html_url":"https://github.com/meumobi/sitebuilder/issues/81","id":76275899,"number":81,"title":"site-builder sent push of category whose push is disabled","user":{"login":"elbidone","id":9011612,"avatar_url":"https://avatars.githubusercontent.com/u/9011612?v=3","gravatar_id":"","url":"https://api.github.com/users/elbidone","html_url":"https://github.com/elbidone","followers_url":"https://api.github.com/users/elbidone/followers","following_url":"https://api.github.com/users/elbidone/following{/other_user}","gists_url":"https://api.github.com/users/elbidone/gists{/gist_id}","starred_url":"https://api.github.com/users/elbidone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elbidone/subscriptions","organizations_url":"https://api.github.com/users/elbidone/orgs","repos_url":"https://api.github.com/users/elbidone/repos","events_url":"https://api.github.com/users/elbidone/events{/privacy}","received_events_url":"https://api.github.com/users/elbidone/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meumobi/sitebuilder/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"t4deu","id":1649955,"avatar_url":"https://avatars.githubusercontent.com/u/1649955?v=3","gravatar_id":"","url":"https://api.github.com/users/t4deu","html_url":"https://github.com/t4deu","followers_url":"https://api.github.com/users/t4deu/followers","following_url":"https://api.github.com/users/t4deu/following{/other_user}","gists_url":"https://api.github.com/users/t4deu/gists{/gist_id}","starred_url":"https://api.github.com/users/t4deu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t4deu/subscriptions","organizations_url":"https://api.github.com/users/t4deu/orgs","repos_url":"https://api.github.com/users/t4deu/repos","events_url":"https://api.github.com/users/t4deu/events{/privacy}","received_events_url":"https://api.github.com/users/t4deu/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/meumobi/sitebuilder/milestones/3","html_url":"https://github.com/meumobi/sitebuilder/milestones/rel-2.6.2","labels_url":"https://api.github.com/repos/meumobi/sitebuilder/milestones/3/labels","id":1107392,"number":3,"title":"rel-2.6.2","description":"","creator":{"login":"juliogreff","id":58992,"avatar_url":"https://avatars.githubusercontent.com/u/58992?v=3","gravatar_id":"","url":"https://api.github.com/users/juliogreff","html_url":"https://github.com/juliogreff","followers_url":"https://api.github.com/users/juliogreff/followers","following_url":"https://api.github.com/users/juliogreff/following{/other_user}","gists_url":"https://api.github.com/users/juliogreff/gists{/gist_id}","starred_url":"https://api.github.com/users/juliogreff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliogreff/subscriptions","organizations_url":"https://api.github.com/users/juliogreff/orgs","repos_url":"https://api.github.com/users/juliogreff/repos","events_url":"https://api.github.com/users/juliogreff/events{/privacy}","received_events_url":"https://api.github.com/users/juliogreff/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":8,"state":"open","created_at":"2015-05-12T19:19:16Z","updated_at":"2015-05-24T15:53:35Z","due_on":"2015-05-20T22:00:00Z","closed_at":null},"comments":3,"created_at":"2015-05-14T07:59:27Z","updated_at":"2015-05-25T14:00:33Z","closed_at":null,"body":"site-builder sent today earlier a push for new entry of category 40 from site_id 6 (INT). But the notification of this category is disabled.\r\n\r\nOBS: the log don't provide the category_id as expected\r\n\r\n```\r\n# tail -1000f log/sitebuilder.log |grep virtual\r\n[2015-05-13 23:03:03] sitebuilder.INFO: Sending push notification {\"item id\":\"5553bc06b5a508d5488b468f\",\"site id\":6,\"content\":\"O cérebro virtual de clínicas e hospitais\",\"devices\":[\"7777777\",\"f522204377bae9f7f5a5e6c65e6c7559c32752e3792c5b3e9634ee15fe577b90\",\"APA91bH7VRNi77U5DgKPDIAQJMKD6S2AHf0_niSplGHchPwdxDAbZr_1NSkT6h7lnuFLRAuqV3QkVc2xarqxuJFwsx-n9mc0jCQiptW1SsD8kGApO4_PhKeBvD4W75d16FbnhkrzcP3mEZXQj1kt1kEduhUwfEmcWg\",\"APA91bEPiJQCtS9WVgqUnJN7A8DiA1J1xU7oAlX1xQlO7wNGO7Q4eUoqsa1JioKlLuGLxFeBbKdlj73Vn8d34snmtohjM6YaxMdr_rx2bXJRDI1Z_Yh4GrcEkMa1C1Rpz6acldT1u5lU3AuH0F1CQoOpUQpdUWEp5Q\",\"fbc7d97e7d692668918aab1963d27ad111b5d0b262a8be6f27ba60d293a35ddf\",\"5fa7c0c49ef6275edab4f204fce2b665c43bd4763d4662e3d2b94c976fd7173b\",\"f154e9d2f800bb02db99133546e50ae4ac49b1fd4eba84359c6c932f84f6024d\",\"APA91bHLCKyqOBxYQWj3EJ4NDkDCDXzPolv9bnjYYEck3XNO11dntoEfCEmpq8rgVjFS78OaaHotU9B0Bcf6JvPez4VHJKybDLa5NhACaD61sgDizpi-I3YH84OmqBFHx1x5gEyIRgPR7IAcdwPK9L-wWmSLl96c5Q\",\"APA91bEAHjfQCmBp47RhOZtMZsxVvkSMwVjdxZ0HEKHpVgvZqf9fLyn6EjIkIqAbcmO-rT0g0QOydssPZhoMIqzuao0K4ecFAHuaz_ihWbQJXG1WyV2cJxYtyw11XdC5Tb0GshREjYXH3x_lYWTPO8ZKwYr_hkCabA\",\"fb0578d099b25d372db368d99cd2738451f18451d67230453c4d52190b19b9f2\",\"5fa7c0c49ef6275edab4f204fce2b665c43bd4763d4662e3d2b94c976fd7173b\",\"f522204377bae9f7f5a5e6c65e6c7559c32752e3792c5b3e9634ee15fe577b90\",\"APA91bERO9N7C24RKbysatSfotKdmRfDHjeK5s8WpLAiQshkuuJPdwdzUzRvk7nbvy32UAJBkLzivvUL_lIcFVeqCuU4eRj4XOr5btTZBDEMH3HYU9gErpXoEdFVdNnSXIzyMvZIsK1cEWrz8GhW2442dSV1XYZ9Lw\"]}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/meumobi/sitebuilder/issues/comments/105238983","html_url":"https://github.com/meumobi/sitebuilder/issues/81#issuecomment-105238983","issue_url":"https://api.github.com/repos/meumobi/sitebuilder/issues/81","id":105238983,"user":{"login":"t4deu","id":1649955,"avatar_url":"https://avatars.githubusercontent.com/u/1649955?v=3","gravatar_id":"","url":"https://api.github.com/users/t4deu","html_url":"https://github.com/t4deu","followers_url":"https://api.github.com/users/t4deu/followers","following_url":"https://api.github.com/users/t4deu/following{/other_user}","gists_url":"https://api.github.com/users/t4deu/gists{/gist_id}","starred_url":"https://api.github.com/users/t4deu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t4deu/subscriptions","organizations_url":"https://api.github.com/users/t4deu/orgs","repos_url":"https://api.github.com/users/t4deu/repos","events_url":"https://api.github.com/users/t4deu/events{/privacy}","received_events_url":"https://api.github.com/users/t4deu/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T14:00:33Z","updated_at":"2015-05-25T14:00:33Z","body":"Couldn't find another log for category 40 or item \"5553bc06b5a508d5488b468f\" on INT,\r\nand the item and category already had been removed from the database.\r\nSo I cound't check the push configurations for the category.\r\n\r\nBut to prevent the error from happening again, a verification will be made at \"PushNotificationWorker::perform\" method before send the notification:\r\n```php\r\nclass PushNotificationWorker\r\n{\r\n  public function perform() {\r\n    $category = $this->getItem()->getParent();\r\n    if (!$category->notification) {                                                               \r\n      $this->logger()->info(\"Can`t send push, Push disabled in category {$category->id}\");\r\n      return true;                    \r\n    }\r\n  ...\r\n```\r\nAlso the category id will added to the push logs "}}