{"action":"created","issue":{"url":"https://api.github.com/repos/celery/celery/issues/3505","repository_url":"https://api.github.com/repos/celery/celery","labels_url":"https://api.github.com/repos/celery/celery/issues/3505/labels{/name}","comments_url":"https://api.github.com/repos/celery/celery/issues/3505/comments","events_url":"https://api.github.com/repos/celery/celery/issues/3505/events","html_url":"https://github.com/celery/celery/issues/3505","id":182075893,"number":3505,"title":"Setting a particular $PATH environment for the celery daemon","user":{"login":"alexvicegrab","id":1575642,"avatar_url":"https://avatars.githubusercontent.com/u/1575642?v=3","gravatar_id":"","url":"https://api.github.com/users/alexvicegrab","html_url":"https://github.com/alexvicegrab","followers_url":"https://api.github.com/users/alexvicegrab/followers","following_url":"https://api.github.com/users/alexvicegrab/following{/other_user}","gists_url":"https://api.github.com/users/alexvicegrab/gists{/gist_id}","starred_url":"https://api.github.com/users/alexvicegrab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexvicegrab/subscriptions","organizations_url":"https://api.github.com/users/alexvicegrab/orgs","repos_url":"https://api.github.com/users/alexvicegrab/repos","events_url":"https://api.github.com/users/alexvicegrab/events{/privacy}","received_events_url":"https://api.github.com/users/alexvicegrab/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/celery/celery/labels/Category:%20Deployment","name":"Category: Deployment","color":"772123"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-10T17:55:20Z","updated_at":"2016-10-12T08:01:10Z","closed_at":null,"body":"Hi,\r\n\r\nI'm running Celery on a Django app on an Ubuntu AWS instance (with Nginx & Gunicorn)\r\n\r\nI need my celery instance to have a specific $PATH environmental variable, beyond the typical:\r\n\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games\"\r\n\r\nHaving gone through the basic tutorials on the website and extensively searched on Stack Overflow I've not found a solution:\r\n\r\n1) changing /etc/default/celeryd to include an \"export PATH\" does not solve the problem.\r\n2) Indeed, echoing the $PATH in the /etc/init.d/celeryd script shows the $PATH I want, but it is apparently reset within the celery worker.\r\n\r\nHow can I solve this?\r\n\r\nThank you!\r\n"},"comment":{"url":"https://api.github.com/repos/celery/celery/issues/comments/253145394","html_url":"https://github.com/celery/celery/issues/3505#issuecomment-253145394","issue_url":"https://api.github.com/repos/celery/celery/issues/3505","id":253145394,"user":{"login":"alexvicegrab","id":1575642,"avatar_url":"https://avatars.githubusercontent.com/u/1575642?v=3","gravatar_id":"","url":"https://api.github.com/users/alexvicegrab","html_url":"https://github.com/alexvicegrab","followers_url":"https://api.github.com/users/alexvicegrab/followers","following_url":"https://api.github.com/users/alexvicegrab/following{/other_user}","gists_url":"https://api.github.com/users/alexvicegrab/gists{/gist_id}","starred_url":"https://api.github.com/users/alexvicegrab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexvicegrab/subscriptions","organizations_url":"https://api.github.com/users/alexvicegrab/orgs","repos_url":"https://api.github.com/users/alexvicegrab/repos","events_url":"https://api.github.com/users/alexvicegrab/events{/privacy}","received_events_url":"https://api.github.com/users/alexvicegrab/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T08:01:10Z","updated_at":"2016-10-12T08:01:10Z","body":"I think I solved it:\r\n\r\nWhat is missing is an exporting of the $PATH prior to launching the workers.\r\n\r\nWhat happens in the /etc/init.d/celeryd is:\r\n\r\n    su celery -c 'celery restart worker1 [etc.]'\r\n\r\nWhat needs to happen is:\r\n\r\n    su celery -c 'export PATH='$(echo $PATH)' && celery restart worker1 [etc.]'\r\n\r\nBut I'm not sure how to elegantly and automatically implement the exporting of the other variables defined in /etc/default/celeryd\r\n\r\n"}}
{"actor":{"display_login":"alexvicegrab"}}