diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-26 15:34:04 +0200 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-26 15:34:04 +0200 |
| commit | 068fba04843a8e1a9a96c13211f98a89c39100a5 (patch) | |
| tree | 2a8488b82ff3cdfdab69c780dd4d07b8865b5c72 /clusterman/commands/node.py | |
| parent | 3e670642781b33825eee01f17cf79906e1e20897 (diff) | |
Minor changes
Diffstat (limited to 'clusterman/commands/node.py')
| -rw-r--r-- | clusterman/commands/node.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clusterman/commands/node.py b/clusterman/commands/node.py index 280cb2e..a04b1a7 100644 --- a/clusterman/commands/node.py +++ b/clusterman/commands/node.py @@ -3,7 +3,7 @@ from clusterman.config import CONF def ls(): - nodes_path=CONF["paths"]["nodes"] + nodes_path=CONF.NODE_FILE nodes=None if os.path.exists(nodes_path): with open(nodes_path) as f: @@ -14,7 +14,6 @@ def ls(): for node in nodes: print(node) - def scan(timeout): from_split=[int(n) for n in CONF["cluster"]["ip4_from"].split(".")] to_split=[int(n) for n in CONF["cluster"]["ip4_to"].split(".")] @@ -36,13 +35,13 @@ def scan(timeout): print("=> Found!!") else: print("") - with open(CONF["paths"]["nodes"], "w") as f: + with open(CONF.NODE_FILE, "w") as f: f.write(json.dumps(nodes,indent=4)) - CONF["cluster"]["last_scan"]=int(time.time()) + CONF["cache"]["last_scan"]=int(time.time()) CONF.save() def check(timeout): - nodes_path=CONF["paths"]["nodes"] + nodes_path=CONF.NODE_FILE nodes=None if os.path.exists(nodes_path): with open(nodes_path) as f: |
