question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-reload on code change

See original GitHub issue

It would be great if daphne had a feature to auto reload whenever code changes similar to what gunicorn does with the reload flag.

I know the runworker is an option but this would allow for an much easier deploy for me. Now I have to give my development servers a separate run command and it creates a different environment which could cause problems.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

10reactions
kiruhcommented, Nov 6, 2020

What is the current preferred way of auto reloading during development?

7reactions
wolphcommented, Aug 15, 2016

There are several reasons:

  1. Runserver is very limited, as soon as you have a more demanding web application (for example, one that requires parallel requests) it’s not suitable anymore
  2. To reduce complexity and to make sure everything works similarly on production and development I run gunicorn on both with a single ansible deploy configuration. The only difference is that development has DEBUG enabled.

I agree with your statement that runserver = development but I disagree with runworker = production. While runworker can be used in production it can be used in development as well similarly to how gunicorn and celery can be used both in production and in development environments.

Luckily your environment is simple enough not to require anything outside the scope of runserver but that isn’t to say everyone has that luxury.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tornado.autoreload — Automatically detect code changes in ...
tornado.autoreload — Automatically detect code changes in development¶. Automatically restart the server when a source file is modified.
Read more >
autoreload — IPython 8.7.0 documentation
Replacing code objects does not always succeed: changing a @property in a class to an ordinary method or a method to a member...
Read more >
stevekrenzel/autoreload: A small python script to ... - GitHub
Autoreload is a simple python script to watch a directory for changed files and restarts a process when the change is detected. To...
Read more >
How to auto-reload changes in JavaScript code using Webpack.
to watch for changes in your JS files and to automatically reload the changes in your browser. 8. Open your index. html file...
Read more >
How to auto-reload Celery worker on Code Change - AccordBox
In this Django Celery tutorial, I would talk about how to auto-reload Celery worker on code change. Here I will provide you two...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found