fix: call push_to_gitea every cycle to retry on failure

This commit is contained in:
2026-06-24 13:13:52 +02:00
parent 05bc2b02ec
commit ef910b6dd9
+3 -3
View File
@@ -483,14 +483,14 @@ def run_daemon_loop(mirrors: Dict[str, Mirror]) -> None:
logger.debug("Checking mirror %s", mid) logger.debug("Checking mirror %s", mid)
try: try:
svn_count = sync_all(m) svn_count = sync_all(m)
if svn_count: try:
push_to_gitea(m) push_to_gitea(m)
except GiteaError as ge:
logger.warning("Gitea push failed for %s: %s", mid, ge)
fetch_from_gitea(m) fetch_from_gitea(m)
git_count = sync_git_to_svn(m) git_count = sync_git_to_svn(m)
if svn_count or git_count: if svn_count or git_count:
last_sync[mid] = now last_sync[mid] = now
except (GiteaError) as ge:
logger.warning("Gitea push failed for %s: %s", mid, ge)
except Exception: except Exception:
logger.exception("Sync cycle failed for %s", mid) logger.exception("Sync cycle failed for %s", mid)