feat: add filelock back
All checks were successful
build / trigger-build-image (push) Successful in 47s
All checks were successful
build / trigger-build-image (push) Successful in 47s
This commit is contained in:
parent
3a511660bb
commit
f4fb5eae05
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user