本文整理汇总了Python中munch.Munch.vm_cycle_timeout方法的典型用法代码示例。如果您正苦于以下问题:Python Munch.vm_cycle_timeout方法的具体用法?Python Munch.vm_cycle_timeout怎么用?Python Munch.vm_cycle_timeout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类munch.Munch
的用法示例。
在下文中一共展示了Munch.vm_cycle_timeout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _read_unsafe
# 需要导入模块: from munch import Munch [as 别名]
# 或者: from munch.Munch import vm_cycle_timeout [as 别名]
def _read_unsafe(self):
cp = ConfigParser.ConfigParser()
cp.read(self.config_file)
opts = Munch()
opts.results_baseurl = _get_conf(cp, "backend", "results_baseurl", "http://copr-be")
opts.frontend_base_url = _get_conf(cp, "backend", "frontend_base_url", "http://copr-fe")
opts.dist_git_url = _get_conf(cp, "backend", "dist_git_url", "http://dist-git")
opts.frontend_auth = _get_conf(cp, "backend", "frontend_auth", "PASSWORDHERE")
opts.do_sign = _get_conf(cp, "backend", "do_sign", False, mode="bool")
opts.keygen_host = _get_conf(cp, "backend", "keygen_host", "copr-keygen.cloud.fedoraproject.org")
opts.build_user = _get_conf(cp, "backend", "build_user", DEF_BUILD_USER)
opts.build_groups_count = _get_conf(cp, "backend", "build_groups", 1, mode="int")
opts.build_groups = []
for group_id in range(opts.build_groups_count):
archs = _get_conf(cp, "backend", "group{0}_archs".format(group_id), default="i386,x86_64").split(",")
group = {
"id": int(group_id),
"name": _get_conf(cp, "backend", "group{0}_name".format(group_id), "PC"),
"archs": archs,
"spawn_playbook": _get_conf(
cp,
"backend",
"group{0}_spawn_playbook".format(group_id),
default="/srv/copr-work/provision/builderpb-PC.yml",
),
"terminate_playbook": _get_conf(
cp,
"backend",
"group{0}_terminate_playbook".format(group_id),
default="/srv/copr-work/provision/terminatepb-PC.yml",
),
"max_workers": _get_conf(
cp, "backend", "group{0}_max_workers".format(group_id), default=32, mode="int"
),
"max_vm_total": _get_conf(
cp,
"backend",
"group{}_max_vm_total".format(group_id),
# default=16, mode="int"),
default=8,
mode="int",
),
"max_vm_per_user": _get_conf(
cp, "backend", "group{}_max_vm_per_user".format(group_id), default=4, mode="int"
),
"max_builds_per_vm": _get_conf(
cp, "backend", "group{}_max_builds_per_vm".format(group_id), default=10, mode="int"
),
"max_spawn_processes": _get_conf(
cp, "backend", "group{}_max_spawn_processes".format(group_id), default=2, mode="int"
),
"vm_spawn_min_interval": _get_conf(
cp, "backend", "group{}_vm_spawn_min_interval".format(group_id), default=30, mode="int"
),
"vm_dirty_terminating_timeout": _get_conf(
cp, "backend", "group{}_vm_dirty_terminating_timeout".format(group_id), default=120, mode="int"
),
"vm_health_check_period": _get_conf(
cp, "backend", "group{}_vm_health_check_period".format(group_id), default=120, mode="int"
),
"vm_health_check_max_time": _get_conf(
cp, "backend", "group{}_vm_health_check_max_time".format(group_id), default=300, mode="int"
),
"vm_max_check_fails": _get_conf(
cp, "backend", "group{}_vm_max_check_fails".format(group_id), default=2, mode="int"
),
"vm_terminating_timeout": _get_conf(
cp, "backend", "group{}_vm_terminating_timeout".format(group_id), default=600, mode="int"
),
}
opts.build_groups.append(group)
opts.vm_cycle_timeout = _get_conf(cp, "backend", "vm_cycle_timeout", default=10, mode="int")
opts.vm_ssh_check_timeout = _get_conf(cp, "backend", "vm_ssh_check_timeout", default=5, mode="int")
opts.destdir = _get_conf(cp, "backend", "destdir", None, mode="path")
opts.exit_on_worker = _get_conf(cp, "backend", "exit_on_worker", False, mode="bool")
opts.fedmsg_enabled = _get_conf(cp, "backend", "fedmsg_enabled", False, mode="bool")
opts.sleeptime = _get_conf(cp, "backend", "sleeptime", 10, mode="int")
opts.timeout = _get_conf(cp, "builder", "timeout", DEF_BUILD_TIMEOUT, mode="int")
opts.consecutive_failure_threshold = _get_conf(
cp, "builder", "consecutive_failure_threshold", DEF_CONSECUTIVE_FAILURE_THRESHOLD, mode="int"
)
opts.log_dir = _get_conf(cp, "backend", "log_dir", "/var/log/copr/")
opts.log_level = _get_conf(cp, "backend", "log_level", "info")
opts.verbose = _get_conf(cp, "backend", "verbose", False, mode="bool")
opts.prune_days = _get_conf(cp, "backend", "prune_days", None, mode="int")
#.........这里部分代码省略.........