Upload app.py
Browse files
app.py
CHANGED
|
@@ -149,10 +149,11 @@ def background_scheduler():
|
|
| 149 |
schedule.every().day.at(UPDATE_TIME).do(run_update_task)
|
| 150 |
logging.info(f"Scheduled daily update task for {UPDATE_TIME}.")
|
| 151 |
|
| 152 |
-
# Run once immediately on startup
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
|
|
|
| 156 |
|
| 157 |
while True:
|
| 158 |
schedule.run_pending()
|
|
|
|
| 149 |
schedule.every().day.at(UPDATE_TIME).do(run_update_task)
|
| 150 |
logging.info(f"Scheduled daily update task for {UPDATE_TIME}.")
|
| 151 |
|
| 152 |
+
# --- Run once immediately on startup ---
|
| 153 |
+
logging.info("Background task: Running initial update check on startup...")
|
| 154 |
+
run_update_task() # Call the task function directly
|
| 155 |
+
logging.info("Background task: Initial update check finished.")
|
| 156 |
+
# ---
|
| 157 |
|
| 158 |
while True:
|
| 159 |
schedule.run_pending()
|