Files
2125_GCE/runtime_executor/integration.py
T
2026-07-09 12:54:44 -04:00

41 lines
1002 B
Python
Executable File

import time
from typing import Dict, Any
from .runner import execute_gx, ExecutionError
def run_gx_with_summary(path: str) -> Dict[str, Any]:
start_time = time.time()
try:
context = execute_gx(path, trace=False, profile=False)
duration = time.time() - start_time
return {
"path": path,
"segments_executed": len(context.plan),
"errors": [],
"duration": duration,
"success": True
}
except ExecutionError as e:
duration = time.time() - start_time
return {
"path": path,
"segments_executed": 0,
"errors": [str(e)],
"duration": duration,
"success": False
}
except Exception as e:
duration = time.time() - start_time
return {
"path": path,
"segments_executed": 0,
"errors": [str(e)],
"duration": duration,
"success": False
}