E
E
enabl32018-02-07 18:13:35
Python
enabl3, 2018-02-07 18:13:35

How to organize multi-channel use of the Telegram bot?

Hello.
When the bot is used by different people at the same time, it works in turn.
From the beginning it processes the request of one, after the second.
If these are simple commands, then this is not noticeable, but there are commands in which scripts are written for execution, and until this script works, it does not take another command.
How can this be fixed?
Python bot.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ivankomolin, 2018-02-07
@ivankomolin

Well, it's not about the bot, but about the implementation of the daemon that listens to the connection with the bot.
In the flow of receiving a command from a bot, do only cheap operations. For example, send jobs to a queue and process jobs from the queue in separate threads.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question