{"action":"created","issue":{"url":"https://api.github.com/repos/kizniche/mycodo_python/issues/2","labels_url":"https://api.github.com/repos/kizniche/mycodo_python/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/kizniche/mycodo_python/issues/2/comments","events_url":"https://api.github.com/repos/kizniche/mycodo_python/issues/2/events","html_url":"https://github.com/kizniche/mycodo_python/issues/2","id":120648068,"number":2,"title":"Threading, Daemons, and Servers","user":{"login":"Cabalist","id":828557,"avatar_url":"https://avatars.githubusercontent.com/u/828557?v=3","gravatar_id":"","url":"https://api.github.com/users/Cabalist","html_url":"https://github.com/Cabalist","followers_url":"https://api.github.com/users/Cabalist/followers","following_url":"https://api.github.com/users/Cabalist/following{/other_user}","gists_url":"https://api.github.com/users/Cabalist/gists{/gist_id}","starred_url":"https://api.github.com/users/Cabalist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cabalist/subscriptions","organizations_url":"https://api.github.com/users/Cabalist/orgs","repos_url":"https://api.github.com/users/Cabalist/repos","events_url":"https://api.github.com/users/Cabalist/events{/privacy}","received_events_url":"https://api.github.com/users/Cabalist/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kizniche/mycodo_python/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-06T17:49:33Z","updated_at":"2015-12-06T17:57:08Z","closed_at":null,"body":"I am going to try and keep my questions about threading here.  \r\n\r\nFirst!  The Daemon claims to ```receive/execute commands from mycodo-client.py``` but it appears that mycodo_client has it's own rpyc_client that talks to the rpyc server.  How is the the daemon involved?  Is it?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kizniche/mycodo_python/issues/comments/162332121","html_url":"https://github.com/kizniche/mycodo_python/issues/2#issuecomment-162332121","issue_url":"https://api.github.com/repos/kizniche/mycodo_python/issues/2","id":162332121,"user":{"login":"kizniche","id":838427,"avatar_url":"https://avatars.githubusercontent.com/u/838427?v=3","gravatar_id":"","url":"https://api.github.com/users/kizniche","html_url":"https://github.com/kizniche","followers_url":"https://api.github.com/users/kizniche/followers","following_url":"https://api.github.com/users/kizniche/following{/other_user}","gists_url":"https://api.github.com/users/kizniche/gists{/gist_id}","starred_url":"https://api.github.com/users/kizniche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kizniche/subscriptions","organizations_url":"https://api.github.com/users/kizniche/orgs","repos_url":"https://api.github.com/users/kizniche/repos","events_url":"https://api.github.com/users/kizniche/events{/privacy}","received_events_url":"https://api.github.com/users/kizniche/received_events","type":"User","site_admin":false},"created_at":"2015-12-06T17:57:08Z","updated_at":"2015-12-06T17:57:08Z","body":"The daemon is instructed to terminate when `client_que = 'TerminateServer'`\r\n\r\nwhich is set by:\r\n\r\n```python\r\n    def exposed_terminate_daemon(self, remoteCommand):\r\n        global client_que\r\n        client_que = 'TerminateServer'\r\n        logging.info(\"[Client command] Shut down the daemon\")\r\n        mycodo_log.Concatenate_Logs()\r\n        return 1\r\n```"}}