MCPcopy
hub / github.com/chartbrew/chartbrew / persistRun

Function persistRun

server/modules/updateAudit.js:296–320  ·  view source on GitHub ↗
(context, values)

Source from the content-addressed store, hash-verified

294}
295
296async function persistRun(context, values) {
297 if (!db.UpdateRun || !context.runId) {
298 emitStructuredAuditLog("run_update_skipped", {
299 traceId: context.traceId,
300 rootTraceId: context.rootTraceId,
301 values,
302 });
303 return context;
304 }
305
306 try {
307 await db.UpdateRun.update(values, { where: { id: context.runId } });
308 } catch (error) {
309 emitAuditInternalError("[updateAudit] failed to update run", error);
310 }
311
312 emitStructuredAuditLog("run_updated", {
313 runId: context.runId,
314 traceId: context.traceId,
315 rootTraceId: context.rootTraceId,
316 values,
317 });
318
319 return context;
320}
321
322async function startRun(payload = {}, parentTraceContext = null) {
323 const baseContext = cloneTraceContext(parentTraceContext);

Callers 1

updateRunContextFunction · 0.85

Calls 3

emitStructuredAuditLogFunction · 0.85
emitAuditInternalErrorFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected