本文整理汇总了Python中coprs.logic.builds_logic.BuildsLogic.get_build_importing_queue方法的典型用法代码示例。如果您正苦于以下问题:Python BuildsLogic.get_build_importing_queue方法的具体用法?Python BuildsLogic.get_build_importing_queue怎么用?Python BuildsLogic.get_build_importing_queue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coprs.logic.builds_logic.BuildsLogic
的用法示例。
在下文中一共展示了BuildsLogic.get_build_importing_queue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: dist_git_importing_queue
# 需要导入模块: from coprs.logic.builds_logic import BuildsLogic [as 别名]
# 或者: from coprs.logic.builds_logic.BuildsLogic import get_build_importing_queue [as 别名]
def dist_git_importing_queue():
"""
Return list of builds that are waiting for dist git to import the sources.
"""
builds_list = []
for task in BuildsLogic.get_build_importing_queue().limit(200):
copr = task.build.copr
# we are using fake username's here
if copr.is_a_group_project:
user_name = u"@{}".format(copr.group.name)
else:
user_name = copr.user.name
task_dict = {
"task_id": task.import_task_id,
"user": user_name,
"project": task.build.copr.name,
"branch": helpers.chroot_to_branch(task.mock_chroot.name),
"source_type": task.build.source_type,
"source_json": task.build.source_json,
}
if task_dict not in builds_list:
builds_list.append(task_dict)
response_dict = {"builds": builds_list}
return flask.jsonify(response_dict)
示例2: test_build_queue_2
# 需要导入模块: from coprs.logic.builds_logic import BuildsLogic [as 别名]
# 或者: from coprs.logic.builds_logic.BuildsLogic import get_build_importing_queue [as 别名]
def test_build_queue_2(self, f_users, f_coprs, f_mock_chroots, f_db):
self.db.session.commit()
data = BuildsLogic.get_build_importing_queue().all()
assert len(data) == 0