Skip to content

How to use Schedule with Fastapi #374

Answered by s3rius
vunhatchuong asked this question in Q&A
Discussion options

You must be logged in to vote

The problem core is in the way how ZeroMQ works. Please switch to another broker for correct behavior.

The problem is that ZeroMQ publisher needs to bind a port so subscribers can connect to this address. Since scheduler is sending tasks, it needs to bind a socket for publishing, but your fastapi application has already bound this port for publishing because of the broker that runs inside the app.

Also, yes, scheduler needs to run in order to schedule tasks. So my suggestion would be to try another broker like redis, nats or rabbitmq.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by s3rius
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants