mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
Change Job.is_removed to be a property instead of a method
This commit is contained in:
parent
ed1785981d
commit
423251f66c
1 changed files with 3 additions and 2 deletions
|
@ -279,7 +279,7 @@ class JobQueue(object):
|
|||
self._set_next_peek(t)
|
||||
break
|
||||
|
||||
if job.is_removed():
|
||||
if job.is_removed:
|
||||
self.logger.debug('Removing job %s', job.name)
|
||||
continue
|
||||
|
||||
|
@ -296,7 +296,7 @@ class JobQueue(object):
|
|||
else:
|
||||
self.logger.debug('Skipping disabled job %s', job.name)
|
||||
|
||||
if job.repeat and not job.is_removed():
|
||||
if job.repeat and not job.is_removed:
|
||||
self._put(job, last_t=t)
|
||||
else:
|
||||
self.logger.debug('Dropping non-repeating or removed job %s', job.name)
|
||||
|
@ -427,6 +427,7 @@ class Job(object):
|
|||
"""
|
||||
self._remove.set()
|
||||
|
||||
@property
|
||||
def is_removed(self):
|
||||
return self._remove.is_set()
|
||||
|
||||
|
|
Loading…
Reference in a new issue