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

Configure workers #266

Closed
ferndot opened this issue Jan 12, 2019 · 7 comments · Fixed by #908
Closed

Configure workers #266

ferndot opened this issue Jan 12, 2019 · 7 comments · Fixed by #908
Labels
docs Improve documentation

Comments

@ferndot
Copy link

ferndot commented Jan 12, 2019

It would be great if the gunicorn workers could support uvicorn's config options.

I would like to run a Django Channels project using them, but cannot do so at this time because the disable_lifespan option from #262 cannot be set.

@tomchristie
Copy link
Member

Yeah indeed, that’d be nice. Thoughts on how best to approach that would be most welcome.

@tomchristie
Copy link
Member

Related: Have we dug into whichever part of the ASGI ecosystem doesn’t yet support lifespan?
Is it channels? It’d be great to get that up to speed too.

@ferndot
Copy link
Author

ferndot commented Jan 12, 2019

I believe it is channels since they do not have any mention of lifespan in their docs or code. I opened an issue: django/channels#1216

@tomchristie
Copy link
Member

We provide (undocumented) support for this now...

class CustomWorker(UvicornWorker):
    CONFIG_KWARGS = {...}

I guess I'll leave the ticket open until we've documented this.

@kubami
Copy link

kubami commented May 4, 2020

Is the custom class with CONFIG_KWARGS still the best option (ha!)?

I see there is an --env-file parameter, but I am not sure if it's possible to pass it to uvicorn from gunicorn.

For completeness there is a ticket for lifespan protocol in Django now as well: https://code.djangoproject.com/ticket/31508

@thomasmodeneis
Copy link

bump

@Kludex
Copy link
Member

Kludex commented Jun 2, 2023

bump

?

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

Successfully merging a pull request may close this issue.

6 participants