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

Proposal for adding on_shutdown signal #722

Merged
merged 3 commits into from
Jan 6, 2016
Merged

Proposal for adding on_shutdown signal #722

merged 3 commits into from
Jan 6, 2016

Conversation

asvetlov
Copy link
Member

@asvetlov asvetlov commented Jan 5, 2016

We need a way for closing long-running responses like websockets and data streaming,

The proposal does it by introducing on_shutdown signal and documenting the recommended way to use it.

Consider it as pre-requisite for #690

@fafhrd91
Copy link
Member

fafhrd91 commented Jan 5, 2016

+1

@asvetlov
Copy link
Member Author

asvetlov commented Jan 5, 2016

Added Application.shutdown() coroutine as straightforward way to call on_shutdown signal.

@fafhrd91
Copy link
Member

fafhrd91 commented Jan 5, 2016

could you add Application.shutdown() to gunicorn worker as well.

@asvetlov
Copy link
Member Author

asvetlov commented Jan 5, 2016

Sorry, I don't follow.
Do you mean Worker.close()?
It has no application attr, only make_handler accepts app parameter.
I suggest splitting the request into separate issue.
Please create the one.

@fafhrd91
Copy link
Member

fafhrd91 commented Jan 5, 2016

self.wsgi is Application object, worker should call shutdown() right after finish

@asvetlov
Copy link
Member Author

asvetlov commented Jan 6, 2016

Done

asvetlov added a commit that referenced this pull request Jan 6, 2016
Proposal for adding on_shutdown signal
@asvetlov asvetlov merged commit 3f9cf7b into master Jan 6, 2016
@asvetlov asvetlov deleted the finish_signal branch January 6, 2016 16:28
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants