mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix polling stuch problem.
This commit is contained in:
parent
855ff40070
commit
e7e681928d
@ -39,13 +39,12 @@ class WorkerThread(threading.Thread):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while self._running:
|
while self._running:
|
||||||
self.continue_event.clear()
|
|
||||||
self.received_task_event.clear()
|
|
||||||
self.done_event.clear()
|
|
||||||
self.exception_event.clear()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
task, args, kwargs = self.queue.get(block=True, timeout=.5)
|
task, args, kwargs = self.queue.get(block=True, timeout=.5)
|
||||||
|
self.continue_event.clear()
|
||||||
|
self.received_task_event.clear()
|
||||||
|
self.done_event.clear()
|
||||||
|
self.exception_event.clear()
|
||||||
logger.debug("Received task")
|
logger.debug("Received task")
|
||||||
self.received_task_event.set()
|
self.received_task_event.set()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user