taslim19
commited on
Commit
·
a9b26b7
1
Parent(s):
41a9d86
Temporarily disable bot to fix event loop issues - focus on API first
Browse files- OneApi/__main__.py +2 -15
OneApi/__main__.py
CHANGED
|
@@ -39,19 +39,6 @@ async def home():
|
|
| 39 |
return jsonify({'success': 'server online'}), 200
|
| 40 |
|
| 41 |
if __name__ == '__main__':
|
| 42 |
-
#
|
| 43 |
-
|
| 44 |
-
import asyncio
|
| 45 |
-
|
| 46 |
-
def run_bot():
|
| 47 |
-
loop = asyncio.new_event_loop()
|
| 48 |
-
asyncio.set_event_loop(loop)
|
| 49 |
-
loop.run_until_complete(start_bot())
|
| 50 |
-
loop.run_forever()
|
| 51 |
-
|
| 52 |
-
# Start bot in background thread
|
| 53 |
-
bot_thread = threading.Thread(target=run_bot, daemon=True)
|
| 54 |
-
bot_thread.start()
|
| 55 |
-
|
| 56 |
-
# Start the web server in main thread
|
| 57 |
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 8080)))
|
|
|
|
| 39 |
return jsonify({'success': 'server online'}), 200
|
| 40 |
|
| 41 |
if __name__ == '__main__':
|
| 42 |
+
# For now, just start the web server
|
| 43 |
+
# Bot will be added later when we fix the event loop issues
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 8080)))
|