mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 07:18:27 +01:00
Add --no-locker param
This commit is contained in:
@@ -30,17 +30,19 @@ class CmdDataRemove(CmdBase):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
lock = fasteners.InterProcessLock(self.git.lock_file)
|
||||
gotten = lock.acquire(timeout=5)
|
||||
if not gotten:
|
||||
Logger.info('[Cmd-Remove] Cannot perform the cmd since DVC is busy and locked. Please retry the cmd later.')
|
||||
return 1
|
||||
if self.is_locker:
|
||||
lock = fasteners.InterProcessLock(self.git.lock_file)
|
||||
gotten = lock.acquire(timeout=5)
|
||||
if not gotten:
|
||||
Logger.info('[Cmd-Remove] Cannot perform the cmd since DVC is busy and locked. Please retry the cmd later.')
|
||||
return 1
|
||||
|
||||
try:
|
||||
if not self.remove_all_targets():
|
||||
return 1
|
||||
finally:
|
||||
lock.release()
|
||||
if self.is_locker:
|
||||
lock.release()
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user