diff --git a/dvc/lock.py b/dvc/lock.py index eb691f33d..f552cbae6 100644 --- a/dvc/lock.py +++ b/dvc/lock.py @@ -35,7 +35,9 @@ if is_py3: """ def __init__(self, lockfile, lifetime=None, tmp_dir=None): - if isinstance(lifetime, int): + if lifetime is None: + lifetime = timedelta(days=365) # Lock for good by default + elif isinstance(lifetime, int): lifetime = timedelta(seconds=lifetime) self._tmp_dir = tmp_dir @@ -81,8 +83,6 @@ else: Uses zc.lockfile as backend. """ - TIMEOUT = 5 - def __init__(self, lockfile, lifetime=None, tmp_dir=None): self.lockfile = lockfile self._lock = None diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 70acdabc0..b1ca827e6 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -72,8 +72,6 @@ class Repo(object): self.lock = Lock( os.path.join(self.dvc_dir, "lock"), - # This should be longer than operations we are protecting - lifetime=60 * 60 * 24 * 30, tmp_dir=os.path.join(self.dvc_dir, "tmp"), ) # NOTE: storing state and link_state in the repository itself to avoid