- Better error reporting.
- Flask now uses application's logger instead of its own. - ucloud file scanner refactored.
This commit is contained in:
parent
eea6c1568e
commit
972bb5a920
14 changed files with 157 additions and 154 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue