diff --git a/joint_teapot/app.py b/joint_teapot/app.py index 5137671..47c1fa0 100644 --- a/joint_teapot/app.py +++ b/joint_teapot/app.py @@ -6,7 +6,7 @@ from pathlib import Path from time import sleep from typing import TYPE_CHECKING, List, Optional -# from filelock import FileLock +from filelock import FileLock from git import Repo from typer import Argument, Exit, Option, Typer, echo @@ -392,8 +392,7 @@ def joj3_all_env( f"try to acquire lock, file path: {lock_file_path}, " + f"timeout: {settings.joj3_lock_file_timeout}" ) - if True: # disable the file lock temporarily - # with FileLock(lock_file_path, timeout=settings.joj3_lock_file_timeout).acquire(): + with FileLock(lock_file_path, timeout=settings.joj3_lock_file_timeout).acquire(): logger.info("file lock acquired") retry_interval = 1 git_push_ok = False diff --git a/joint_teapot/config.py b/joint_teapot/config.py index ed69ad8..c6bd025 100644 --- a/joint_teapot/config.py +++ b/joint_teapot/config.py @@ -40,7 +40,7 @@ class Settings(BaseSettings): joj_sid: str = "" # joj3 - joj3_lock_file_path: str = ".git/teapot.lock" + joj3_lock_file_path: str = ".git/teapot-joj3-all-env.lock" joj3_lock_file_timeout: int = 30 # moss