A
A
Alexander2020-04-19 20:04:26
Python
Alexander, 2020-04-19 20:04:26

Asynchronous processing or bot queue?

Good evening, the task was to implement a chat bot that would receive a link to a video (the length of which is up to 3 minutes, if it is important, I can’t say right now by the weight of the files) and download this video, send it to me in private messages, delete it from server. What is the best approach for this, handle it immediately asynchronously, am I going to use aiohttp or add a task to celery and already process it from the queue? It is not planned to process the file in any way, the main task is to download and send it as quickly as possible, even if a large number of links to the video have arrived at the same time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-04-19
@AlexMine

If there are blocking operations in your chain (usually it is CPU Bound), then queue, if everything is just IO Bound, then you can do it "immediately asynchronously"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question