viperadnan-git / google-drive-telegram-bot

A Google Drive Telegram Bot for managing, cloning files, uploading files on Google Drive
GNU General Public License v3.0
612 stars 1.6k forks source link

sleep problem #55

Closed DanyTPG closed 3 years ago

DanyTPG commented 3 years ago

Hi. I noticed if you send a few files like 6-7 then the bot just stops working. when checked heroku logs I noticed this sleep function:

2021-02-20T10:01:50.180952+00:00 app[worker.1]: 2021-02-20 10:01:50,180 - pyrogram.session.session - WARNING - [G-DriveBot] Sleeping for 3s (required by "raw.functions.upload.GetFile")
2021-02-20T10:01:53.627754+00:00 app[worker.1]: 2021-02-20 10:01:53,627 - pyrogram.session.session - WARNING - [G-DriveBot] Sleeping for 3s (required by "raw.functions.upload.GetFile")
2021-02-20T10:01:53.656675+00:00 app[worker.1]: 2021-02-20 10:01:53,656 - pyrogram.session.session - WARNING - [G-DriveBot] Sleeping for 3s (required by "raw.functions.upload.GetFile")
2021-02-20T10:01:58.645293+00:00 app[worker.1]: 2021-02-20 10:01:58,644 - pyrogram.session.session - WARNING - [G-DriveBot] Sleeping for 3s (required by "raw.functions.upload.GetFile")

what is the use of it? the bot goes into constant sleep if the number of files is more than 5-6

viperadnan-git commented 3 years ago

Yeah due to Telegram Flood Wait, Don't spam the bot