Обновить dags/migration_reporter_dag.py
This commit is contained in:
@@ -73,9 +73,20 @@ def migration_reporter_pipeline():
|
||||
|
||||
@task
|
||||
def pull_repo() -> str:
|
||||
"""Обновляет локальную копию репозитория миграций"""
|
||||
stdout = _run(["git", "-C", REPO_DIR, "pull", "--ff-only"], timeout=600)
|
||||
return stdout.strip() or "already up to date"
|
||||
import os, subprocess
|
||||
print(f"REPO_DIR={REPO_DIR}")
|
||||
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
|
||||
def generate_excel() -> dict:
|
||||
|
||||
Reference in New Issue
Block a user