fixed set level

migration_mirror 3.7.1.4
Иван Дзюбенко 2 years ago
parent 3b79f758eb
commit 2ff2810339

@ -20,6 +20,7 @@ import sys
from os import path
import os
import time
from typing_extensions import Required
from calculate.core.server.gen_pid import search_worked_process
from calculate.core.setup_cache import Cache as SetupCache
from calculate.core.server.func import MethodsInterface
@ -1691,7 +1692,8 @@ class Update(MethodsInterface):
return True
def get_migration_mirror_url(self, host, level):
return f"{host}level{level}"
level_required = int(level) + 1
return f"{host}level{level_required}"
@variable_module("update")
def detect_best_binhost(self):
@ -1823,5 +1825,8 @@ class Update(MethodsInterface):
return True
def update_set_current_level(self):
self.clVars.Set('update.cl_update_level',
Variable.On, force=True)
current_level = int(self.clVars.Get('cl_update_level'))
self.clVars.Write('cl_update_level',
str(current_level + 1), location="system")
self.clVars.Set("update.cl_update_use_migration_host",
Variable.Off)

@ -1857,11 +1857,11 @@ class VariableClUpdateLevel(Variable):
Текущий уровень обновления
Используется для выбора зеркала
"""
value = "0"
type = "int"
class VariableClUpdateUseMigrationHost(Variable):
"""
Уровень обновления на бинхосте
Использовать хост миграции
"""
type = "bool"
value = "off"

Loading…
Cancel
Save