From 157c642386246ac442da1b747a12f9b5eff52b5a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 8 Dec 2022 11:56:53 +0300 Subject: [PATCH] =?UTF-8?q?TG-73=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=B2=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=BD=D1=8B=D1=85=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B1=D0=B8=D0=BD=D1=85=D0=BE=D1=81=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 3 ++- pym/update/utils/cl_update.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pym/update/update.py b/pym/update/update.py index b95ebaa..b3f1d7d 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -15,6 +15,7 @@ # limitations under the License. from functools import wraps import random +import asyncio import sys from os import path @@ -1683,7 +1684,7 @@ class Update(MethodsInterface): retval = [] skip_check_status = False actual_reason = self.Reason.UnknownError - for binhost in sorted(binhosts_data.get_binhosts(), reverse=True): + for binhost in sorted(asyncio.run(binhosts_data.get_asyncbinhosts()), reverse=True): host = binhost.host if not binhost.valid: reason = self.Reason.WrongBinhost diff --git a/pym/update/utils/cl_update.py b/pym/update/utils/cl_update.py index 56feea7..56fd311 100644 --- a/pym/update/utils/cl_update.py +++ b/pym/update/utils/cl_update.py @@ -91,10 +91,12 @@ def get_synchronization_tasks(object_name): 'method': Object(f'detect_best_binhost({object_name.lower()}.cl_update_ignore_level)'), 'essential': False, 'depend': (Tasks.success() & ~AllTasks.has_any("not_use_search") & - (~AllTasks.success_one_of("check_current_binhost") | + (AllTasks.failed_one_of("check_current_binhost") | + AllTasks.failed_one_of("check_chosen_binhost") | + (AllTasks.hasnot("check_current_binhost") & + AllTasks.hasnot("check_chosen_binhost")) | AllTasks.success_all("sync_reps"))), 'condition': lambda Get: Get('update.cl_update_use_migration_host') == 'off', - 'depend': AllTasks.hasnot("check_chosen_binhost"), }, {'name': 'interrupt_on_no_leveled_binhost', 'method': Object("interrupt_on_no_leveled_binhost()"),