From 247c244aa5559bd543d0c629fcbbb237129491a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Thu, 12 Jan 2023 16:14:00 +0545 Subject: [PATCH] process: remove lock/unlock See https://github.com/iterative/dvc-task/pull/104\#discussion_r1066962471. --- src/dvc_task/proc/process.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/dvc_task/proc/process.py b/src/dvc_task/proc/process.py index 7564cf6..5f20f23 100644 --- a/src/dvc_task/proc/process.py +++ b/src/dvc_task/proc/process.py @@ -13,7 +13,6 @@ from funcy import cached_property from shortuuid import uuid -from ..contrib.kombu_filesystem import LOCK_SH, lock, unlock from ..utils import makedirs from .exceptions import TimeoutExpired @@ -39,11 +38,7 @@ def from_dict(cls, data: Dict[str, Any]) -> "ProcessInfo": def load(cls, filename: str) -> "ProcessInfo": """Construct the process information from a file.""" with open(filename, encoding="utf-8") as fobj: - lock(fobj, LOCK_SH) - try: - return cls.from_dict(json.load(fobj)) - finally: - unlock(fobj) + return cls.from_dict(json.load(fobj)) def asdict(self) -> Dict[str, Any]: """Return this info as a dictionary."""