Replies: 2 comments 3 replies
-
I thought I got the answer from the source code. Just write this: from twisted.internet import reactor
def before_shutdown():
print('Succeed!')
reactor.addSystemEventTrigger("before", "shutdown", before_shutdown)
async def application(scope, receive, send):
pass |
Beta Was this translation helpful? Give feedback.
0 replies
-
You might also use an ASGI Lifespan middleware for this kind of thing. 🤔 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using daphne to deploy my websocket app, without django or channels.
I hope the data in memory can be saved on disk when I exit daphne.
Do you have any good ideas? Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions