channel_logging.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:jose 作者: lnmds 项目源码 文件源码
def emitter(self):
        while not self.closed:
            now = time.monotonic()

            send_delta = now - self._last_emit
            if send_delta < 5:
                await asyncio.sleep(5 - send_delta)

            self._last_emit = time.monotonic()

            paginator = commands.Paginator(prefix='', suffix='')

            for chunk in self._buffer:
                paginator.add_line(chunk.strip())

            self._buffer.clear()
            self._can_emit.clear()

            for page in paginator.pages:
                await self.webhook.execute(page)

            await self._can_emit.wait()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号