- Better error reporting.

- Flask now uses application's logger instead of its own.
- ucloud file scanner refactored.
This commit is contained in:
ahmadbilalkhalid 2019-12-23 12:58:04 +05:00
commit 972bb5a920
14 changed files with 157 additions and 154 deletions

View file

@ -16,8 +16,7 @@ vmm = virtualmachine.VMM()
def update_heartbeat(hostname):
"""Update Last HeartBeat Time for :param hostname: in etcd"""
client = shared.etcd_client
host_pool = HostPool(client)
host_pool = shared.host_pool
this_host = next(filter(lambda h: h.hostname == hostname, host_pool.hosts), None)
while True:
@ -27,7 +26,7 @@ def update_heartbeat(hostname):
def main(hostname):
host_pool = HostPool(shared.etcd_client)
host_pool = shared.host_pool
host = next(filter(lambda h: h.hostname == hostname, host_pool.hosts), None)
assert host is not None, "No such host with name = {}".format(hostname)