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

Fix reloading #7527

Merged
merged 1 commit into from
Mar 12, 2020
Merged

Fix reloading #7527

merged 1 commit into from
Mar 12, 2020

Conversation

di
Copy link
Member

@di di commented Mar 12, 2020

Fixes #6578. A few things:

  • Gunicorn has it's own reloader which works perfectly here, except:
  • The reloader doesn't work with preload_app, which we set in our gunicorn.conf.py file, and:
  • We use gunicorn.conf.py in local development, however:
  • We don't need to at all, everything specified in it is overkill for local development, but unfortunately:
  • Gunicorn picks up gunicorn.conf.py regardless of whether we specify it or not, so:
  • We also need to rename gunicorn.conf.py to gunicorn-prod.conf.py so --reload works.

(Unfortunately we still need hupper for the celery worker due to celery --autoreload being deprecated.)

Copy link
Contributor

@yeraydiazdiaz yeraydiazdiaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice research there, thanks! 👍

Copy link
Member

@ewdurbin ewdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's way faster at reloading too 👍

@ewdurbin ewdurbin merged commit 9a97225 into master Mar 12, 2020
@ewdurbin ewdurbin deleted the fix-reloading branch March 12, 2020 12:26
@di
Copy link
Member Author

di commented Mar 13, 2020

It seems like one downside is that until benoitc/gunicorn#2244 is fixed, any syntax error will crash the reloader, but it's still better than what we had before.

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.

Docker compose "web" service fails to reload on code changes
3 participants