Обновить dags/migration_reporter_dag.py

This commit is contained in:
2026-10-30 16:53:29 +03:00
parent eb5a6f80e6
commit 97c9a1efde
+14 -3
View File
@@ -73,9 +73,20 @@ def migration_reporter_pipeline():
@task @task
def pull_repo() -> str: def pull_repo() -> str:
"""Обновляет локальную копию репозитория миграций""" import os, subprocess
stdout = _run(["git", "-C", REPO_DIR, "pull", "--ff-only"], timeout=600) print(f"REPO_DIR={REPO_DIR}")
return stdout.strip() or "already up to date" print(f"Exists: {os.path.exists(REPO_DIR)}")
print(f"CWD: {os.getcwd()}")
result = subprocess.run(
["git", "-C", REPO_DIR, "pull", "--ff-only"],
capture_output=True, text=True, timeout=600
)
print(f"STDOUT: {result.stdout}")
print(f"STDERR: {result.stderr}")
print(f"RC: {result.returncode}")
if result.returncode != 0:
raise RuntimeError(f"git pull failed: {result.stderr}")
return result.stdout.strip() or "already up to date"
@task @task
def generate_excel() -> dict: def generate_excel() -> dict: