controllers.py 文件源码

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

项目:sample-platform 作者: CCExtractor 项目源码 文件源码
def start_new_test(db, repository, delay):
    """
        Function to start a new test based on kvm table.
    """
    from run import log
    finished_tests = db.query(TestProgress.test_id).filter(
        TestProgress.status.in_([TestStatus.canceled, TestStatus.completed])
    ).subquery()
    test = Test.query.filter(
        and_(Test.id.notin_(finished_tests))
    ).order_by(Test.id.asc()).first()
    if test is None:
        return
    elif test.platform is TestPlatform.windows:
        kvm_processor_windows(db, repository, delay)
    elif test.platform is TestPlatform.linux:
        kvm_processor_linux(db, repository, delay)
    else:
        log.error("Unsupported CI platform: {platform}".format(
            platform=test.platform))
    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号