class DockerLock(object): def __init__(self): self.containers = Containers(VOLUME_DRIVER_NAME) def acquire(self, volume): self.containers.stop(volume) def release(self, volume): self.containers.start(volume)
def __init__(self): self.containers = Containers(VOLUME_DRIVER_NAME)