def enqueuedJob(self):
"""
Reschedule the work check loop to run right now. This should be called in response to "external" activity that
might want to "speed up" the job queue polling because new work may have been added.
"""
# Only need to do this if the actual poll interval is greater than the default rapid value
if self._actualPollInterval == self.queuePollInterval:
return
# Bump time of last work so that we go back to the rapid (default) polling interval
self._timeOfLastWork = time.time()
# Reschedule the outstanding delayed call (handle exceptions by ignoring if its already running or
# just finished)
try:
if self._workCheckCall is not None:
self._workCheckCall.reset(0)
except (AlreadyCalled, AlreadyCancelled):
pass
评论列表
文章目录