Updated app.py
This commit is contained in:
parent
032268f9b1
commit
0156c3060f
@ -1,10 +1,5 @@
|
||||
import multiprocessing as mp
|
||||
import time
|
||||
|
||||
from flask import Flask
|
||||
|
||||
from telegram_bot.bot import bot
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
@ -14,12 +9,4 @@ def hello_world():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
proc1 = mp.Process(target=app.run, args=())
|
||||
proc1.start()
|
||||
|
||||
while True:
|
||||
try:
|
||||
bot.polling(none_stop=True)
|
||||
except Exception as e:
|
||||
print(f"[EXCEPTION] {e}")
|
||||
time.sleep(15)
|
||||
app.run()
|
||||
|
Loading…
Reference in New Issue
Block a user