{"action":"created","issue":{"url":"https://api.github.com/repos/celery/celery/issues/2700","repository_url":"https://api.github.com/repos/celery/celery","labels_url":"https://api.github.com/repos/celery/celery/issues/2700/labels{/name}","comments_url":"https://api.github.com/repos/celery/celery/issues/2700/comments","events_url":"https://api.github.com/repos/celery/celery/issues/2700/events","html_url":"https://github.com/celery/celery/issues/2700","id":93878725,"number":2700,"title":"SIGTERM does not do a warm shutdown.","user":{"login":"feanil","id":781561,"avatar_url":"https://avatars.githubusercontent.com/u/781561?v=3","gravatar_id":"","url":"https://api.github.com/users/feanil","html_url":"https://github.com/feanil","followers_url":"https://api.github.com/users/feanil/followers","following_url":"https://api.github.com/users/feanil/following{/other_user}","gists_url":"https://api.github.com/users/feanil/gists{/gist_id}","starred_url":"https://api.github.com/users/feanil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feanil/subscriptions","organizations_url":"https://api.github.com/users/feanil/orgs","repos_url":"https://api.github.com/users/feanil/repos","events_url":"https://api.github.com/users/feanil/events{/privacy}","received_events_url":"https://api.github.com/users/feanil/received_events","type":"User","site_admin":false},"labels":[{"id":235024002,"url":"https://api.github.com/repos/celery/celery/labels/Issue%20Type:%20Bug","name":"Issue Type: Bug","color":"e11d21","default":false},{"id":235027917,"url":"https://api.github.com/repos/celery/celery/labels/Status:%20Needs%20Verification","name":"Status: Needs Verification","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2015-07-08T20:09:20Z","updated_at":"2016-11-10T15:09:16Z","closed_at":"2016-06-28T23:09:04Z","body":"According to the documentation here: http://celery.readthedocs.org/en/latest/userguide/workers.html#process-signals\n\nI should be able to send a SIGTERM to my running worker process and have it finish the task it is currently working on before it shuts down.  However when I call sigterm the process exits immediately with the following traceback.\n\n```\nTraceback (most recent call last):\n  File \"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/billiard/pool.py\", line 1171, in mark_as_worker_lost\n    human_status(exitcode)),\nWorkerLostError: Worker exited prematurely: signal 15 (SIGTERM).\n```\n\nI'm using Celery 3.1.18 with django 1.4, is there something special that has to be done to integrate the signal handlers with django?\n\nAlso posted here on the mailing list: https://groups.google.com/forum/#!topic/celery-users/t8g5KvIvQZ8\n"},"comment":{"url":"https://api.github.com/repos/celery/celery/issues/comments/259714199","html_url":"https://github.com/celery/celery/issues/2700#issuecomment-259714199","issue_url":"https://api.github.com/repos/celery/celery/issues/2700","id":259714199,"user":{"login":"carn1x","id":783281,"avatar_url":"https://avatars.githubusercontent.com/u/783281?v=3","gravatar_id":"","url":"https://api.github.com/users/carn1x","html_url":"https://github.com/carn1x","followers_url":"https://api.github.com/users/carn1x/followers","following_url":"https://api.github.com/users/carn1x/following{/other_user}","gists_url":"https://api.github.com/users/carn1x/gists{/gist_id}","starred_url":"https://api.github.com/users/carn1x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carn1x/subscriptions","organizations_url":"https://api.github.com/users/carn1x/orgs","repos_url":"https://api.github.com/users/carn1x/repos","events_url":"https://api.github.com/users/carn1x/events{/privacy}","received_events_url":"https://api.github.com/users/carn1x/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T15:09:16Z","updated_at":"2016-11-10T15:09:16Z","body":"I am finding celery multi is exiting immediately on SIGTERM rather than waiting for tasks to finish, is that case applicable to this issue? Also I'm sending SIGTERM to all processes as reported by `ps aux`, should we perhaps only send to the root process or something?"}}
{"actor":{"display_login":"carn1x"}}