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

Reload when staticsite code changes #44

Open
spanezz opened this issue Dec 29, 2019 · 0 comments
Open

Reload when staticsite code changes #44

spanezz opened this issue Dec 29, 2019 · 0 comments

Comments

@spanezz
Copy link
Owner

spanezz commented Dec 29, 2019

Currently staticsite show/serve don't trigger a reload when staticsite's code changes.

/usr/lib/python3/dist-packages/tornado/autoreload.py:_reload_on_update can be a good example of how to list source locations for the current program.

For serve, just doing an exec of sys.argv would be enough. For show, this would cause the new process to bind to a different port, unless --port was used.

Alternatively, we can keep the server socket open and let the new process inherit and use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant