{"action":"created","issue":{"url":"https://api.github.com/repos/dimagi/commcare-hq-deploy/issues/118","repository_url":"https://api.github.com/repos/dimagi/commcare-hq-deploy","labels_url":"https://api.github.com/repos/dimagi/commcare-hq-deploy/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq-deploy/issues/118/comments","events_url":"https://api.github.com/repos/dimagi/commcare-hq-deploy/issues/118/events","html_url":"https://github.com/dimagi/commcare-hq-deploy/pull/118","id":177866870,"number":118,"title":"Bash controlled celery","user":{"login":"benrudolph","id":918514,"avatar_url":"https://avatars.githubusercontent.com/u/918514?v=3","gravatar_id":"","url":"https://api.github.com/users/benrudolph","html_url":"https://github.com/benrudolph","followers_url":"https://api.github.com/users/benrudolph/followers","following_url":"https://api.github.com/users/benrudolph/following{/other_user}","gists_url":"https://api.github.com/users/benrudolph/gists{/gist_id}","starred_url":"https://api.github.com/users/benrudolph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benrudolph/subscriptions","organizations_url":"https://api.github.com/users/benrudolph/orgs","repos_url":"https://api.github.com/users/benrudolph/repos","events_url":"https://api.github.com/users/benrudolph/events{/privacy}","received_events_url":"https://api.github.com/users/benrudolph/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-19T18:55:43Z","updated_at":"2016-09-20T01:56:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq-deploy/pulls/118","html_url":"https://github.com/dimagi/commcare-hq-deploy/pull/118","diff_url":"https://github.com/dimagi/commcare-hq-deploy/pull/118.diff","patch_url":"https://github.com/dimagi/commcare-hq-deploy/pull/118.patch"},"body":"alright @gcapalbo third time's the charm! played around with this on staging and i think it does exactly what we'd want. you made a good point about monitoring that i haven't yet tested. just for posterity here's how it works\r\n\r\n1. supervisor will spawn off a bash process\r\n2. the bash process then spawns a celery process\r\n3. when supervisor restarts, it'll send a SIGTERM to the bash process\r\n4. the bash process will catch the SIGTERM and forward it to celery initiating a warm shutdown\r\n5. the bash process exits, which frees up supervisor to restart a new bash process\r\n6. the celery process is able to do a complete warm shutdown\r\n\r\nfyi: @snopoke @czue "},"comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq-deploy/issues/comments/248180648","html_url":"https://github.com/dimagi/commcare-hq-deploy/pull/118#issuecomment-248180648","issue_url":"https://api.github.com/repos/dimagi/commcare-hq-deploy/issues/118","id":248180648,"user":{"login":"benrudolph","id":918514,"avatar_url":"https://avatars.githubusercontent.com/u/918514?v=3","gravatar_id":"","url":"https://api.github.com/users/benrudolph","html_url":"https://github.com/benrudolph","followers_url":"https://api.github.com/users/benrudolph/followers","following_url":"https://api.github.com/users/benrudolph/following{/other_user}","gists_url":"https://api.github.com/users/benrudolph/gists{/gist_id}","starred_url":"https://api.github.com/users/benrudolph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benrudolph/subscriptions","organizations_url":"https://api.github.com/users/benrudolph/orgs","repos_url":"https://api.github.com/users/benrudolph/repos","events_url":"https://api.github.com/users/benrudolph/events{/privacy}","received_events_url":"https://api.github.com/users/benrudolph/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T01:56:13Z","updated_at":"2016-09-20T01:56:13Z","body":"👍 i'll do some investigatin"}}
{"actor":{"display_login":"benrudolph"}}