MCPcopy Create free account
hub / github.com/Facets-cloud/flow / finalizeAutoRun

Function finalizeAutoRun

internal/app/auto.go:179–186  ·  view source on GitHub ↗

finalizeAutoRun records a terminal auto-run status ('completed' or 'dead') and clears the supervisor pid. Best-effort: errors are returned for the caller to log, but the run is over regardless.

(db *sql.DB, slug, status string)

Source from the content-addressed store, hash-verified

177 pid, now, logPath, now, slug,
178 )
179 return err
180}
181
182// finalizeAutoRun records a terminal auto-run status ('completed' or
183// 'dead') and clears the supervisor pid. Best-effort: errors are returned
184// for the caller to log, but the run is over regardless.
185func finalizeAutoRun(db *sql.DB, slug, status string) error {
186 now := flowdb.NowISO()
187 _, err := db.Exec(
188 `UPDATE tasks SET auto_run_status=?, auto_run_finished=?, auto_run_pid=NULL, updated_at=? WHERE slug=?`,
189 status, now, now, slug,

Callers 1

cmdAutoExecFunction · 0.85

Calls 1

NowISOFunction · 0.92

Tested by

no test coverage detected