git_deploy: refresh previously corrupt repos
It is possible that the user manually corrected a corrupt repo. If a repo makes it past initialization reset the corrupt flag. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
1a3689cb7d
commit
779997c2b8
|
@ -401,6 +401,8 @@ class GitRepo:
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
self.initialized = True
|
self.initialized = True
|
||||||
|
# If no exception was raised assume the repo is not corrupt
|
||||||
|
self.repo_corrupt = False
|
||||||
finally:
|
finally:
|
||||||
self.init_evt.set()
|
self.init_evt.set()
|
||||||
self.init_evt = None
|
self.init_evt = None
|
||||||
|
@ -571,8 +573,6 @@ class GitRepo:
|
||||||
async def update_repo_status(self) -> bool:
|
async def update_repo_status(self) -> bool:
|
||||||
async with self.git_operation_lock:
|
async with self.git_operation_lock:
|
||||||
self.valid_git_repo = False
|
self.valid_git_repo = False
|
||||||
if self.repo_corrupt:
|
|
||||||
return False
|
|
||||||
if not self.git_path.joinpath(".git").exists():
|
if not self.git_path.joinpath(".git").exists():
|
||||||
logging.info(
|
logging.info(
|
||||||
f"Git Repo {self.alias}: path '{self.git_path}'"
|
f"Git Repo {self.alias}: path '{self.git_path}'"
|
||||||
|
|
Loading…
Reference in New Issue