Something went wrong. Try again.
a git ci runner
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536import sentry_sdkimport utils.dbfrom utils.models import Executionimport uuid
def get_specific_execution(execution_id: uuid.UUID): db_session = utils.db.SessionLocal() try: execution = db_session.query(Execution).filter(Execution.id == execution_id).first()
if execution: match execution.status: case 0: status = "container_created" case 1: status = "running_init_commands" case 2: status = "running_steps" case 3: status = "run_complete" case 4: status = "run_failed" case -1: status = "internal_error_during_execution" case _: status = "unknown"
return { "metadata": { "id": str(execution.id), "workflow_name": execution.workflow_name, "completed_time": execution.finish_time, "status": status }, "output": execution.execution_data } return {"status":"error", "error":"execution result not found"} except Exception as e: sentry_sdk.capture_exception(e) return {"status":"error", "error":"still no logging :P"} finally: db_session.close()