diff options
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: |
