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

Allow configuring a different reloader #984

Closed
dstufft opened this issue Feb 17, 2015 · 4 comments
Closed

Allow configuring a different reloader #984

dstufft opened this issue Feb 17, 2015 · 4 comments

Comments

@dstufft
Copy link

dstufft commented Feb 17, 2015

Currently the only way to customize the Reloader implementation is to either monkeypatch it or subclass the worker. It would be great if there was a way, even if it was only really available via gunicorn.app.base.Application subclassing, to configure our own Reloader.

Alternatively a way to specify additional files (maybe with a glob?) would be useful instead.

@berkerpeksag
Copy link
Collaborator

We probably can add a reloader_class attribute to gunicorn.app.base.Application.

@tilgovi
Copy link
Collaborator

tilgovi commented Feb 17, 2015

Even just assigning the new Reloader instance to self.reloader would make it available to the post_worker_init hook. The Reloader has a method add_extra_file.

Would that be sufficient for what you need for this issue or do you really want to customize it in some other way?

@dstufft
Copy link
Author

dstufft commented Feb 17, 2015

That would be good enough for what I need it for I believe.

@tilgovi
Copy link
Collaborator

tilgovi commented Feb 17, 2015

Done.

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

3 participants