scheduler.py 文件源码

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

项目:asynq 作者: quora 项目源码 文件源码
def _continue_with_batch(self):
        """
        Flushes one of batches (the longest one by default).

        :param assert_no_batch: indicates whether exception must be
                                raised if there is no batch to flush
        :return: the batch that was flushed, if there was a flush;
                 otherwise, ``None``.

        """
        batch = self._select_batch_to_flush()
        if batch is None:
            if _debug_options.DUMP_FLUSH_BATCH:
                debug.write('@async: no batch to flush')
            else:
                return None
        self._batches.remove(batch)
        self._flush_batch(batch)
        return batch
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号