From c0e2ec61559e1adbf67c3c451a5ea4c5b0408ce2 Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Mon, 23 Jan 2023 20:02:25 -0500 Subject: [PATCH] Fix logic for creating pidfile parent dir (#512) --- backend/btrixcloud/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/btrixcloud/worker.py b/backend/btrixcloud/worker.py index 338d294f..749dc8be 100644 --- a/backend/btrixcloud/worker.py +++ b/backend/btrixcloud/worker.py @@ -17,7 +17,7 @@ class UniqueWorker: def set_id(self): """Create path to pid file and write to pid.""" - if self.path.exists(): + if not self.path.exists(): self.path.parents[0].mkdir(parents=True, exist_ok=True) with open(self.path, "w", encoding="utf-8") as pid_file: