-
Notifications
You must be signed in to change notification settings - Fork 406
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 TLS certificate files when they change #4290
Conversation
Is there an asyncio-compatible watching library we can use instead of spawning threads? |
No popular and trusted one afaik. Maybe we spawn a thread and just check mtime in a loop every 5 seconds? |
Threads mean GIL. If it can't be in the event loop, then a monitoring subprocess sending SIGHUP to the main process seems better to me. |
That's too complicated. @fantix how about we add a hidden API to uvloop to expose libuv watchers? That should be easy. |
There is https://github.com/samuelcolvin/watchfiles which is mostly an interface to https://github.com/notify-rs/notify but its not 1.0 yet. |
It also uses threads for its async API. |
I'm looking into this now - we can start with tweaking MagicStack/uvloop#474, the basic API should be pretty straightforward.
Oh, edgedb-python doesn't depend on uvloop, and |
@fantix can you pick this one up given that we have the necessary new API in uvloop? |
This partially reverts commit c26d4b3.
Co-authored-by: Elvis Pranskevichus <[email protected]>
Closing in favor of the merged #4297. |
fixes #4277