add create/join switch

This commit is contained in:
Johannes Kirschbauer
2023-10-31 19:05:07 +01:00
parent f20982ec9c
commit c714ab29b4
4 changed files with 101 additions and 19 deletions

View File

@@ -21,6 +21,7 @@ def nix_flake_show(flake_url: AnyUrl | Path) -> list[str]:
"show",
"--json",
"--show-trace",
"--no-write-lock-file",
f"{flake_url}",
]
)
@@ -35,6 +36,7 @@ def nix_build(
"build",
"--no-link",
"--print-out-paths",
"--no-write-lock-file",
]
)
+ flags
@@ -57,6 +59,7 @@ def nix_eval(flags: list[str]) -> list[str]:
"eval",
"--show-trace",
"--json",
"--no-write-lock-file",
]
)
if os.environ.get("IN_NIX_SANDBOX"):

View File

@@ -158,6 +158,7 @@ class TaskPool:
def __init__(self) -> None:
self.lock: threading.RLock = threading.RLock()
self.pool: dict[UUID, BaseTask] = {}
def __getitem__(self, uuid: UUID) -> BaseTask:
with self.lock: