Update app.py
Browse files
app.py
CHANGED
@@ -49,11 +49,7 @@ async def downdb():
|
|
49 |
return '2'
|
50 |
|
51 |
|
52 |
-
loop = asyncio.new_event_loop()
|
53 |
-
asyncio.set_event_loop(loop)
|
54 |
|
55 |
-
rp = loop.run_until_complete(downdb())
|
56 |
-
print('done')
|
57 |
|
58 |
async def updb():
|
59 |
client = TelegramClient(None, api_id, api_hash)
|
@@ -561,6 +557,10 @@ def conversation(recipient_id):
|
|
561 |
|
562 |
|
563 |
if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
564 |
with app.app_context():
|
565 |
db.create_all()
|
566 |
app.run(debug=True, use_reloader=False, host="0.0.0.0", port=7860)
|
|
|
49 |
return '2'
|
50 |
|
51 |
|
|
|
|
|
52 |
|
|
|
|
|
53 |
|
54 |
async def updb():
|
55 |
client = TelegramClient(None, api_id, api_hash)
|
|
|
557 |
|
558 |
|
559 |
if __name__ == '__main__':
|
560 |
+
loop = asyncio.new_event_loop()
|
561 |
+
asyncio.set_event_loop(loop)
|
562 |
+
rp = loop.run_until_complete(downdb())
|
563 |
+
loop.close()
|
564 |
with app.app_context():
|
565 |
db.create_all()
|
566 |
app.run(debug=True, use_reloader=False, host="0.0.0.0", port=7860)
|