Skip to content

JobQueue jobs not running #966

Closed
Closed
@artsim

Description

@artsim

Steps to reproduce

  1. Tried using the timer code example but the queued jobs are not running after being added. I get the setting a timer message but never the BEEP.
def callback_alarm(bot, job):
    bot.send_message(chat_id=job.context, text='BEEP')


def callback_timer(bot, update, job_queue):
    bot.send_message(chat_id=update.message.chat_id, text='Setting a timer for 1 minute!')

    job_queue.run_once(callback_alarm, 60, context=update.message.chat_id)
   

timer_handler = CommandHandler('timer', callback_timer, pass_job_queue=True)
dispatcher.add_handler(timer_handler)

Configuration

Operating System:

Linux mamake 4.14.7-1-ARCH #1 SMP PREEMPT Sun Dec 17 19:13:39 UTC 2017 x86_64 GNU/Linux

Version of Python, python-telegram-bot & dependencies:

$ python -m telegram
python-telegram-bot 9.0.0
certifi 2017.11.05
future 0.16.0
Python 3.6.3 (default, Oct 24 2017, 14:48:20) [GCC 7.2.0]

Logs

2018-01-07 04:16:49,946 - JobQueue - DEBUG - Putting job callback_alarm with t=1515287869.946228

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions