{"action":"created","issue":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/419","labels_url":"https://api.github.com/repos/os-autoinst/openQA/issues/419/labels{/name}","comments_url":"https://api.github.com/repos/os-autoinst/openQA/issues/419/comments","events_url":"https://api.github.com/repos/os-autoinst/openQA/issues/419/events","html_url":"https://github.com/os-autoinst/openQA/pull/419","id":99187230,"number":419,"title":"Scheduler and WebSockets DBus signals","user":{"login":"aaannz","id":1260795,"avatar_url":"https://avatars.githubusercontent.com/u/1260795?v=3","gravatar_id":"","url":"https://api.github.com/users/aaannz","html_url":"https://github.com/aaannz","followers_url":"https://api.github.com/users/aaannz/followers","following_url":"https://api.github.com/users/aaannz/following{/other_user}","gists_url":"https://api.github.com/users/aaannz/gists{/gist_id}","starred_url":"https://api.github.com/users/aaannz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaannz/subscriptions","organizations_url":"https://api.github.com/users/aaannz/orgs","repos_url":"https://api.github.com/users/aaannz/repos","events_url":"https://api.github.com/users/aaannz/events{/privacy}","received_events_url":"https://api.github.com/users/aaannz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-05T11:51:35Z","updated_at":"2015-08-05T12:19:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/os-autoinst/openQA/pulls/419","html_url":"https://github.com/os-autoinst/openQA/pull/419","diff_url":"https://github.com/os-autoinst/openQA/pull/419.diff","patch_url":"https://github.com/os-autoinst/openQA/pull/419.patch"},"body":"- add support for emitting DBus signals into OpenQA::IPC\r\n```perl\r\nOpenQA::IPC->ipc->emit_signal($source_object, $signal_name, [$options])\r\n```\r\n- add Scheduler signals\r\njob_new, [['array', 'uint32']]\r\njob_duplicate, ['uint32', 'uint32']\r\njob_grab, [['dict', 'string', ['variant']]]\r\njob_finish, ['uint32', 'uint32', 'string']\r\njob_cancel, [['array', 'uint32']]\r\njob_restart, [['array', 'uint32']]\r\niso_schedule, [['dict', 'string', ['variant']]]\r\nasset_register, [['dict', 'string', ['variant']]]\r\nasset_delete, [['dict', 'string', ['variant']]]\r\n\r\n- add WebSockets signals\r\nworker_connected', [['dict', 'string', ['variant']]]\r\nworker_disconnected', ['uint32']\r\ncommand_sent',        ['uint32', ['variant']]\r\ncommand_failed',      ['uint32', ['variant']]\r\n\r\nDBus policy file is not yet updated in this PR, so to listen to these signals one need to be geekotest. But I plan to open them to other users and also to open some scheduler getters.\r\nNext step is to add signals to WebAPI so we can register template, job groups, machines changes and etc."},"comment":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/comments/127979323","html_url":"https://github.com/os-autoinst/openQA/pull/419#issuecomment-127979323","issue_url":"https://api.github.com/repos/os-autoinst/openQA/issues/419","id":127979323,"user":{"login":"aaannz","id":1260795,"avatar_url":"https://avatars.githubusercontent.com/u/1260795?v=3","gravatar_id":"","url":"https://api.github.com/users/aaannz","html_url":"https://github.com/aaannz","followers_url":"https://api.github.com/users/aaannz/followers","following_url":"https://api.github.com/users/aaannz/following{/other_user}","gists_url":"https://api.github.com/users/aaannz/gists{/gist_id}","starred_url":"https://api.github.com/users/aaannz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaannz/subscriptions","organizations_url":"https://api.github.com/users/aaannz/orgs","repos_url":"https://api.github.com/users/aaannz/repos","events_url":"https://api.github.com/users/aaannz/events{/privacy}","received_events_url":"https://api.github.com/users/aaannz/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T12:19:26Z","updated_at":"2015-08-05T12:19:26Z","body":"I assumed that everyone know what DBus signals are, so for those not familiar with the concept this PR makes openQA to push (broadcast) DBus messages to systembus when some events occur.\r\nSo i.e. when new iso is scheduled, openQA broadcasts iso_schedule message with parameters like DISTRI, BUILD, ARCH, etc.. and similar when worker comes online, job is assigned, finishes, etc.\r\n\r\nDbus daemon has a filters so when no one is listening to this signals, none will be emitted.\r\nTo listen to this signals (and called methods) simply run:\r\n```bash\r\ndbus-monitor --system \"sender=org.opensuse.openqa.WebSockets\" \"sender=org.opensuse.openqa.Scheduler\"\r\n```"}}