Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass parent environment into all child processes #106

Closed
wants to merge 1 commit into from

Conversation

kdmukai
Copy link

@kdmukai kdmukai commented Oct 29, 2015

Explicitly copies the initial environment from the Cluster into the Sentinel and all worker processes.

Fixes #105

When deployed on AWS Elastic Beanstalk under supervisord the cluster's child worker processes did not have the same environment variables that were originally injected in the supervisord.conf. As a result the workers (presumably) didn't have access to DJANGO_SETTINGS_MODULE and couldn't locate the target task function, causing No module named foo.tasks errors.

Explicitly passing the parent environment into each child process resolved this issue.

Solution based on:
http://stackoverflow.com/a/24664312

Explicitly copies the environment from the Cluster into the Sentinel
and all worker processes.

Fixes Koed00#105
@codecov-io
Copy link

Current coverage is 90.22%

Merging #106 into master will decrease coverage by -6.28% as of 157907f

@@            master    #106   diff @@
======================================
  Files           39      39       
  Stmts         2664    2671     +7
  Branches         0       0       
  Methods          0       0       
======================================
- Hit           2571    2410   -161
  Partial          0       0       
- Missed          93     261   +168

Review entire Coverage Diff as of 157907f

Powered by Codecov. Updated on successful CI builds.

@Koed00 Koed00 closed this Oct 31, 2015
@kdmukai kdmukai deleted the master branch December 7, 2015 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

foo.bar.tasks.my_task fails with "No module named bar.tasks" when running in AWS / Elastic Beanstalk
3 participants