Commit e6326533 by Barry Warsaw

Merge branch 'fix-hangs' into 'master'

Set a timeout on the lock acquisition See merge request !305
parents ade94e8f d1cbc8af
Pipeline #10295072 passed with stage
in 18 minutes 3 seconds
......@@ -15,9 +15,10 @@ The status is printed to stdout and a status code is returned.
We can simulate the master starting up by acquiring its lock.
>>> from datetime import timedelta
>>> from flufl.lock import Lock
>>> lock = Lock(config.LOCK_FILE)
>>> lock.lock()
>>> lock.lock(timeout=timedelta(seconds=20))
>>> ignore = cleanups.callback(lock.unlock, unconditionally=True)
Getting the status confirms that the master is running.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment