This commit is contained in:
parent
128142e965
commit
71414ef9c9
|
|
@ -389,12 +389,12 @@ def joj3_all_env(
|
|||
lock_file_path = os.path.join(
|
||||
settings.repos_dir, grading_repo_name, settings.joj3_lock_file_path
|
||||
)
|
||||
logger.info(
|
||||
logger.debug(
|
||||
f"try to acquire lock, file path: {lock_file_path}, "
|
||||
+ f"timeout: {settings.joj3_lock_file_timeout}"
|
||||
)
|
||||
with FileLock(lock_file_path, timeout=settings.joj3_lock_file_timeout).acquire():
|
||||
logger.info("file lock acquired")
|
||||
logger.debug("file lock acquired")
|
||||
retry_interval = 1
|
||||
git_push_ok = False
|
||||
while not git_push_ok:
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ class Git:
|
|||
os.remove(lock_file_path)
|
||||
locks_removed_count += 1
|
||||
except OSError as e:
|
||||
logger.warning(f"Error removing lock file: {e}")
|
||||
logger.info(f"Removed {locks_removed_count} lock files")
|
||||
logger.warning(f"error removing lock file: {e}")
|
||||
logger.info(f"removed {locks_removed_count} lock files")
|
||||
repo.git.fetch("--tags", "--all", "-f")
|
||||
repo.git.reset("--hard", reset_target)
|
||||
repo.git.clean("-d", "-f", "-x")
|
||||
|
|
@ -143,9 +143,7 @@ class Git:
|
|||
try:
|
||||
repo.index.add(file)
|
||||
except OSError:
|
||||
logger.warning(
|
||||
f'File path "{file}" does not exist. Skipping this file.'
|
||||
)
|
||||
logger.warning(f'file path "{file}" does not exist, skipped')
|
||||
continue
|
||||
if repo.is_dirty(untracked_files=True) or repo.index.diff(None):
|
||||
repo.index.commit(commit_message)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user