Answer the question
In order to leave comments, you need to log in
How to streamline the script?
So a question for the experts.
There is a while loop:
while True:
for event in longpoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW:
chunks = [12355646, 56454654, 56544...]
for i in chunks:
t = threading.Thread(target=sending_message, name='thread: ' + str(i),
args=(session_api, i, bot, send,end_sticker_id, send_q1))
t.start()
Answer the question
In order to leave comments, you need to log in
Queue all of you. Redis, RabbitMQ and others) and there just add as many workers as you need
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question