Skip to content

startup event lock with multiple uvicorn workers #6209

Answered by Kludex
gcdsss asked this question in Questions
Discussion options

You must be logged in to vote

My recommendation is to not use startup for this. Create a separate script for it, that runs before uvicorn.

In case you want to continue with your idea... You can use a redis lock, or file system lock. 👀

Replies: 4 comments

Comment options

Kludex
Dec 5, 2022
Collaborator Sponsor

You must be logged in to vote
0 replies
Answer selected by Kludex
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem question-migrate
3 participants
Converted from issue

This discussion was converted from issue #5732 on February 27, 2023 21:29.