feature: async binhost

master 3.7.2.56
root 1 year ago
parent 5137d0f9ff
commit b8f1789db3

@ -15,6 +15,7 @@
# limitations under the License. # limitations under the License.
from functools import wraps from functools import wraps
import random import random
import asyncio
import sys import sys
from os import path from os import path
@ -1727,7 +1728,8 @@ class Update(MethodsInterface):
retval = [] retval = []
skip_check_status = False skip_check_status = False
actual_reason = self.Reason.UnknownError actual_reason = self.Reason.UnknownError
for binhost in sorted(binhosts_data.get_binhosts(), reverse=True): #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 host = binhost.host
if not binhost.valid: if not binhost.valid:
reason = self.Reason.WrongBinhost reason = self.Reason.WrongBinhost
@ -1783,7 +1785,7 @@ class Update(MethodsInterface):
else: else:
raise UpdateError(_("Failed to find the working server with updates")) raise UpdateError(_("Failed to find the working server with updates"))
return retval return retval
def is_binhost_level_valid(self, binhost): def is_binhost_level_valid(self, binhost):
return self.compare_update_level(binhost.level) == 0 return self.compare_update_level(binhost.level) == 0

Loading…
Cancel
Save