This commit is contained in:
aarizona 2024-07-04 22:19:01 +03:00
parent 2750cea9c4
commit 5b4db31b68
2 changed files with 7 additions and 2 deletions

View File

@ -27,7 +27,7 @@ SECRET_KEY = "django-insecure-ruo!wst&sb8(f9)j5u4rda-w!673lj_-c0a%gx_t@)ff*q*2ze
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
NGROK_TEMP = "af14-193-228-134-167.ngrok-free.app" NGROK_TEMP = "5f4c-193-228-134-167.ngrok-free.app"
ALLOWED_HOSTS = [ ALLOWED_HOSTS = [
"localhost", "localhost",
NGROK_TEMP, NGROK_TEMP,

View File

@ -26,9 +26,14 @@ class TgBotClass(AppConfig):
return app return app
async def some_function(self=None): async def some_function(self=None):
# await TgBotClass.app.bot.get_me()
while True: while True:
if not TgBotClass.my_queue.empty(): if not TgBotClass.my_queue.empty():
item = TgBotClass.my_queue.get() item = TgBotClass.my_queue.get()
try:
await TgBotClass.app.process_update(item)
except Exception as e:
print('err')
await TgBotClass.app.process_update(item) await TgBotClass.app.process_update(item)
TgBotClass.my_queue.task_done() TgBotClass.my_queue.task_done()
time.sleep(3) time.sleep(3)