def send_loop(self):
while True:
await asyncio.sleep(0.25)
if len(self.send_queue) == 0:
continue
# Copy send queue and clear the global one
queue = self.send_queue.copy()
self.send_queue.clear()
# Process and push out the queue.
try:
await self.instance.gbx.multicall(*queue)
except Fault as e:
if 'Login unknown' in str(e):
return
logger.exception(e)
handle_exception(exception=e, module_name=__name__, func_name='send_loop')
except Exception as e:
logger.exception(e)
handle_exception(exception=e, module_name=__name__, func_name='send_loop')
评论列表
文章目录