move _check() after timeouted queue.get() so deadlines are met accurately
This commit is contained in:
parent
dd1df4dc05
commit
ef0b3ec64c
1 changed files with 2 additions and 1 deletions
|
@ -275,7 +275,6 @@ class Bot(object):
|
||||||
self.log.warn("No servers, exiting")
|
self.log.warn("No servers, exiting")
|
||||||
break
|
break
|
||||||
|
|
||||||
self._check()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
item = self._event_queue.get(block=True,
|
item = self._event_queue.get(block=True,
|
||||||
|
@ -284,6 +283,8 @@ class Bot(object):
|
||||||
# caused by timeout being hit. loop back round because a _check
|
# caused by timeout being hit. loop back round because a _check
|
||||||
# call is due
|
# call is due
|
||||||
continue
|
continue
|
||||||
|
finally:
|
||||||
|
self._check()
|
||||||
|
|
||||||
if item.type == TriggerEventType.Action:
|
if item.type == TriggerEventType.Action:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue