Update app.py
Browse files
app.py
CHANGED
|
@@ -106,16 +106,16 @@ async def root():
|
|
| 106 |
|
| 107 |
|
| 108 |
# Function to run the Telegram bot
|
| 109 |
-
def run_bot():
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
|
| 115 |
|
| 116 |
if __name__ == "__main__":
|
| 117 |
# When running app.py directly, start the bot as well.
|
| 118 |
-
run_bot()
|
| 119 |
# Uncomment the next lines to run the FastAPI server standalone.
|
| 120 |
-
|
| 121 |
-
|
|
|
|
| 106 |
|
| 107 |
|
| 108 |
# Function to run the Telegram bot
|
| 109 |
+
# def run_bot():
|
| 110 |
+
# logger.info("Starting Telegram bot...")
|
| 111 |
+
# # Use subprocess to run bot.py in parallel
|
| 112 |
+
# import subprocess
|
| 113 |
+
# subprocess.Popen(["python3", "bot.py"])
|
| 114 |
|
| 115 |
|
| 116 |
if __name__ == "__main__":
|
| 117 |
# When running app.py directly, start the bot as well.
|
| 118 |
+
# run_bot()
|
| 119 |
# Uncomment the next lines to run the FastAPI server standalone.
|
| 120 |
+
import uvicorn
|
| 121 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|