mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
better fix for lockfile
This commit is contained in:
parent
1bf566401d
commit
6a5971bb3c
2 changed files with 4 additions and 2 deletions
|
@ -454,12 +454,14 @@ class MoulinetteLock(object):
|
|||
|
||||
"""
|
||||
|
||||
base_lockfile = "/var/run/moulinette_%s.lock"
|
||||
|
||||
def __init__(self, namespace, timeout=None, interval=0.5):
|
||||
self.namespace = namespace
|
||||
self.timeout = timeout
|
||||
self.interval = interval
|
||||
|
||||
self._lockfile = "/var/run/moulinette_%s.lock" % namespace
|
||||
self._lockfile = self.base_lockfile % namespace
|
||||
self._stale_checked = False
|
||||
self._locked = False
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ def patch_logging(moulinette):
|
|||
|
||||
|
||||
def patch_lock(moulinette):
|
||||
moulinette.core.MoulinetteLock._lock = lambda *args: None
|
||||
moulinette.core.MoulinetteLock.base_lockfile = "moulinette_%s.lock"
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
|
|
Loading…
Reference in a new issue