mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Add option to close lock file
Close the lock file, when no more clients are waiting. This option is not very useful in general, but on Windows files that are opened cannot be deleted. This causes tests to fail, because the deletion of the temporary filesystem folder fails.
This commit is contained in:
parent
35d12ee97e
commit
3f5dd70580
2 changed files with 6 additions and 1 deletions
|
@ -802,3 +802,7 @@ class Collection(BaseCollection):
|
|||
cls._lock_file_locked = False
|
||||
if cls._waiters:
|
||||
cls._waiters[0].notify()
|
||||
if (cls.configuration.getboolean("storage", "close_lock_file")
|
||||
and cls._readers == 0 and not cls._waiters):
|
||||
cls._lock_file.close()
|
||||
cls._lock_file = None
|
Loading…
Add table
Add a link
Reference in a new issue