mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
exp: generate unique worker node names per DVC repo
This commit is contained in:
committed by
Peter Rowlands (변기호)
parent
b9f4398826
commit
69d7bdd0c0
@@ -1,3 +1,4 @@
|
||||
import hashlib
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
@@ -89,8 +90,10 @@ class LocalCeleryQueue(BaseStashQueue):
|
||||
from dvc_task.proc.process import ManagedProcess
|
||||
|
||||
logger.debug("Spawning exp queue worker")
|
||||
wdir_hash = hashlib.sha256(self.wdir.encode("utf-8")).hexdigest()[:6]
|
||||
node_name = f"dvc-exp-{wdir_hash}-1@localhost"
|
||||
ManagedProcess.spawn(
|
||||
["dvc", "exp", "queue-worker", "dvc-exp1@localhost"],
|
||||
["dvc", "exp", "queue-worker", node_name],
|
||||
wdir=self.wdir,
|
||||
name="dvc-exp-worker",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user