diff options
author | Jonathan Weth <git@jonathanweth.de> | 2020-07-30 15:54:06 +0200 |
---|---|---|
committer | Jonathan Weth <git@jonathanweth.de> | 2020-07-30 15:54:06 +0200 |
commit | 367a88ffa591219f6e7028a6a544e521531dee8f (patch) | |
tree | 6be43e1e18893fd07c753fda8d2e6642301980ab | |
parent | ab8103f73e419fc0da924ee7ea5f275e1ece76d7 (diff) | |
download | RWA.Support.SessionService-367a88ffa591219f6e7028a6a544e521531dee8f.tar.gz RWA.Support.SessionService-367a88ffa591219f6e7028a6a544e521531dee8f.tar.bz2 RWA.Support.SessionService-367a88ffa591219f6e7028a6a544e521531dee8f.zip |
Store lock file in own directory in /tmp/
-rwxr-xr-x | service.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -233,7 +233,9 @@ def str2bool(v: Union[str, bool, int]) -> bool: if __name__ == "__main__": - lock_file_path = os.path.join(tempfile.gettempdir(), "rwa-session-service.lock") + lock_dir_path = os.path.join(tempfile.gettempdir(), "rwa-session-service") + os.makedirs(lock_dir_path, exist_ok=True) + lock_file_path = os.path.join(lock_dir_path, "rwa-session-service.lock") # Check for lock file if os.path.exists(lock_file_path): |