Skip to content

How can I make dispatching concurrent? #773

Answered by Hirrolot
Architector4 asked this question in Q&A
Discussion options

You must be logged in to vote

From the Dispatcher documentation:

Updates from different chats are handled concurrently, whereas updates from the same chats are handled sequentially. If the dispatcher is unable to determine a chat ID of an incoming update, it will be handled concurrently. Note that this behaviour can be altered with distribution_function.

Because you communicate with your bot in the same chat, all your updates are handled sequentially, which works as designed. If you want to override this behaviour, you can do it through aforestated distribution_function. In particular, if you want all updates to be handled concurrently, just return None from this function.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Architector4
Comment options

@WaffleLapkin
Comment options

@Hirrolot
Comment options

@WaffleLapkin
Comment options

Answer selected by Architector4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants