aboutsummaryrefslogtreecommitdiffstats
path: root/femtoqueue.py
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-05-15 09:54:08 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-05-15 09:54:08 +0300
commitb56495cd0d4f6bb310ca4e85a32df66d4813fea6 (patch)
treebe7cfcd9b85c52edd51f6f944dd2ba0c4aa1fa1e /femtoqueue.py
parent90715bbbd02efef5fe7d2a8581f043d10498cdde (diff)
Rename node_name to node_id
Diffstat (limited to 'femtoqueue.py')
-rw-r--r--femtoqueue.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/femtoqueue.py b/femtoqueue.py
index b3e2412..55211c2 100644
--- a/femtoqueue.py
+++ b/femtoqueue.py
@@ -18,11 +18,11 @@ class FemtoQueue:
def __init__(
self,
data_dir: str,
- node_name: str,
+ node_id: str,
timeout_stale_ms: int = 30_000,
):
- assert node_name not in self.RESERVED_NAMES
- self.node_name = node_name
+ assert node_id not in self.RESERVED_NAMES
+ self.node_id = node_id
assert timeout_stale_ms > 0
self.timeout_stale_ms = timeout_stale_ms
@@ -33,7 +33,7 @@ class FemtoQueue:
self.data_dir = data_dir
self.dir_creating = path.join(data_dir, "creating")
self.dir_pending = path.join(data_dir, "pending")
- self.dir_in_progress = path.join(data_dir, node_name)
+ self.dir_in_progress = path.join(data_dir, node_id)
self.dir_done = path.join(data_dir, "done")
self.dir_failed = path.join(data_dir, "failed")
@@ -77,7 +77,7 @@ class FemtoQueue:
# Skip non-directories and reserved names
if not path.isdir(full_dir_path):
continue
- if dir_name in self.RESERVED_NAMES + [self.node_name]:
+ if dir_name in self.RESERVED_NAMES + [self.node_id]:
continue
# Check tasks in this node's in-progress directory