Обновить dags/migration_reporter_dag.py
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user