From 2566e86f1e92647a0cd1e0552c2196a841b39abe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 31 Dec 2019 14:13:08 +0100 Subject: [PATCH] [host] get ourselves from etcd --- uncloud/host/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uncloud/host/main.py b/uncloud/host/main.py index d1e7c9a..5ce9e6e 100755 --- a/uncloud/host/main.py +++ b/uncloud/host/main.py @@ -59,6 +59,9 @@ def main(hostname): host_key, host_entry, value_in_json=True ) + # update, get ourselves now for sure + host = next(filter(lambda h: h.hostname == hostname, host_pool.hosts), None) + try: heartbeat_updating_process = mp.Process(target=update_heartbeat, args=(hostname,)) heartbeat_updating_process.start()