Change Job.is_removed to be a property instead of a method

This commit is contained in:
Noam Meltzer 2016-12-20 00:14:03 +02:00
parent ed1785981d
commit 423251f66c

View file

@ -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()