DEVX-118: fix: add delay before wiki verification to avoid race condition

Gitea needs a few seconds to process pushed wiki commits before a
re-clone will see them. Add a 5s sleep after a successful push before
verification re-clones the wiki.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
emil
2026-07-06 15:00:02 +02:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 32b9a53151
commit c97b249935
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -31,6 +31,7 @@ import os
import re
import subprocess # nosec B404
import tempfile
import time
from pathlib import Path
from urllib.parse import urlparse
@@ -309,6 +310,9 @@ def main(dry_run: bool, repo: str | None, verify: bool) -> None:
# Verification
if verify and not dry_run:
if pushed:
click.echo(_("Waiting 5s for Gitea to process pushed commits..."))
time.sleep(5)
click.echo(_("\nVerifying wiki pages..."))
# Re-clone to verify
verify_dir = Path(tmpdir) / "verify"