Merge pull request #55 from bucolucas/fix-job-queue-issue

Debug job queue initialization
This commit is contained in:
2024-08-18 17:46:05 -05:00
committed by GitHub
+6 -1
View File
@@ -280,7 +280,12 @@ def main() -> None:
# Set up job queue to check for updates every 15 minutes
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
logging.info("Bots are running...")