MCPcopy Index your code
hub / github.com/coder/coder / FinalizeStaleChatDebugRows

Method FinalizeStaleChatDebugRows

coderd/database/querier.go:253–253  ·  view source on GitHub ↗

Marks orphaned in-progress rows as interrupted so they do not stay in a non-terminal state forever. The NOT IN list must match the terminal statuses defined by ChatDebugStatus in codersdk/chats.go. The steps CTE also catches steps whose parent run was just finalized (via run_id IN), because Postgre

(ctx context.Context, arg FinalizeStaleChatDebugRowsParams)

Source from the content-addressed store, hash-verified

251 // @now is the caller's clock timestamp so that mock-clock tests stay
252 // consistent with the @updated_before cutoff.
253 FinalizeStaleChatDebugRows(ctx context.Context, arg FinalizeStaleChatDebugRowsParams) (FinalizeStaleChatDebugRowsRow, error)
254 // FindMatchingPresetID finds a preset ID that is the largest exact subset of the provided parameters.
255 // It returns the preset ID if a match is found, or NULL if no match is found.
256 // The query finds presets where all preset parameters are present in the provided parameters,

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls