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

Method GetChatRetentionDays

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

Returns the chat retention period in days. Chats archived longer than this and orphaned chat files older than this are purged by dbpurge. Returns 30 (days) when no value has been configured. A value of 0 disables chat purging entirely.

(ctx context.Context)

Source from the content-addressed store, hash-verified

410 // dbpurge. Returns 30 (days) when no value has been configured.
411 // A value of 0 disables chat purging entirely.
412 GetChatRetentionDays(ctx context.Context) (int32, error)
413 GetChatSystemPrompt(ctx context.Context) (string, error)
414 // GetChatSystemPromptConfig returns both chat system prompt settings in a
415 // single read to avoid torn reads between separate site-config lookups.

Callers 8

TestChatRetentionDaysFunction · 0.65
getChatRetentionDaysMethod · 0.65
GetChatRetentionDaysMethod · 0.65
purgeTickMethod · 0.65
TestPurgeFunction · 0.65
TestMetricsFunction · 0.65
GetChatRetentionDaysMethod · 0.65
TestChatsMethod · 0.65

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

Tested by 4

TestChatRetentionDaysFunction · 0.52
TestPurgeFunction · 0.52
TestMetricsFunction · 0.52
TestChatsMethod · 0.52