Fix Telegram bot job queue dependency
This commit is contained in:
parent
5754994f8e
commit
807b097eb4
|
|
@ -408,7 +408,10 @@ async def run_bot():
|
|||
|
||||
# Schedule the pending actions check
|
||||
job_queue = application.job_queue
|
||||
job_queue.run_repeating(bot_logic.check_pending_actions, interval=10, first=5)
|
||||
if job_queue:
|
||||
job_queue.run_repeating(bot_logic.check_pending_actions, interval=10, first=5)
|
||||
else:
|
||||
logger.warning("JobQueue is not available. Periodic pending actions check will be skipped.")
|
||||
|
||||
logger.info("Starting Telegram Approval Bot...")
|
||||
await application.initialize()
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
python-telegram-bot==21.1.1
|
||||
python-telegram-bot[job-queue]==20.7
|
||||
|
|
|
|||
Loading…
Reference in a new issue