summaryrefslogtreecommitdiff
path: root/clusterman/commands/node.py
diff options
context:
space:
mode:
authorLoic Guegan <loic.guegan@mailbox.org>2023-10-26 14:39:46 +0200
committerLoic Guegan <loic.guegan@mailbox.org>2023-10-26 14:39:46 +0200
commit3e670642781b33825eee01f17cf79906e1e20897 (patch)
tree58f0b9bfa068acd50cdea27aa8dd25708aac6fb2 /clusterman/commands/node.py
parent20d4f6f28fcaafe8b10bf82e5302180d6d3bc115 (diff)
Minor changes
Diffstat (limited to 'clusterman/commands/node.py')
-rw-r--r--clusterman/commands/node.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/clusterman/commands/node.py b/clusterman/commands/node.py
index eb32d50..280cb2e 100644
--- a/clusterman/commands/node.py
+++ b/clusterman/commands/node.py
@@ -1,4 +1,4 @@
-import os, json
+import os, json, time
from clusterman.config import CONF
@@ -37,7 +37,9 @@ def scan(timeout):
else:
print("")
with open(CONF["paths"]["nodes"], "w") as f:
- f.write(json.dumps(nodes))
+ f.write(json.dumps(nodes,indent=4))
+ CONF["cluster"]["last_scan"]=int(time.time())
+ CONF.save()
def check(timeout):
nodes_path=CONF["paths"]["nodes"]