add delay between image sends
This commit is contained in:
parent
07d927ef4d
commit
8320933422
@ -2,6 +2,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import traceback
|
||||
from time import sleep
|
||||
|
||||
from telegram import Bot, InlineKeyboardMarkup, InlineKeyboardButton
|
||||
from telegram.error import RetryAfter
|
||||
@ -38,6 +39,7 @@ def upload_image_rpc(self, queued_image_pk, fpath, caption):
|
||||
qi.processed = True
|
||||
qi.save()
|
||||
os.unlink(fpath)
|
||||
sleep(.3)
|
||||
except RetryAfter as e:
|
||||
raise self.retry(exc=e, countdown=int(e.retry_after))
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user