aboutsummaryrefslogtreecommitdiffstats
path: root/femtoqueue.py
diff options
context:
space:
mode:
authorJan T <jan@jantuomi.fi>2025-05-15 06:55:48 +0000
committerGitHub <noreply@github.com>2025-05-15 06:55:48 +0000
commitbea332d5831193aaf7f5428956edc8e437fde214 (patch)
treebe7cfcd9b85c52edd51f6f944dd2ba0c4aa1fa1e /femtoqueue.py
parent717c64b4ab228bc1c82acaf4c4f81f9b17e023e0 (diff)
parentb56495cd0d4f6bb310ca4e85a32df66d4813fea6 (diff)
Merge pull request #2 from jantuomi/poksiala-patch-1
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