Add logging to debug job queue initialization

This commit is contained in:
2024-08-18 17:44:09 -05:00
parent 29c423a691
commit 3c07245165
+6 -1
View File
@@ -280,7 +280,12 @@ def main() -> None:
# Set up job queue to check for updates every 15 minutes # Set up job queue to check for updates every 15 minutes
job_queue = apprentice_app.job_queue job_queue = apprentice_app.job_queue
job_queue.run_repeating(check_for_updates, interval=900, first=10) logging.info(f"Job queue initialized: {job_queue}")
if job_queue is None:
logging.error("Job queue is None. This should not happen.")
else:
job = job_queue.run_repeating(check_for_updates, interval=900, first=10)
logging.info(f"Job scheduled: {job}")
# Start both bots # Start both bots
logging.info("Bots are running...") logging.info("Bots are running...")