MCPcopy Create free account
hub / github.com/Noumena-Network/code / getCutoffDate

Function getCutoffDate

src/utils/cleanup.ts:26–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24const DEFAULT_CLEANUP_PERIOD_DAYS = 30
25
26function getCutoffDate(): Date {
27 const settings = getSettings_DEPRECATED() || {}
28 const cleanupPeriodDays =
29 settings.cleanupPeriodDays ?? DEFAULT_CLEANUP_PERIOD_DAYS
30 const cleanupPeriodMs = cleanupPeriodDays * 24 * 60 * 60 * 1000
31 return new Date(Date.now() - cleanupPeriodMs)
32}
33
34export type CleanupResult = {
35 messages: number

Callers 7

cleanupOldMessageFilesFunction · 0.85
cleanupOldSessionFilesFunction · 0.85
cleanupSingleDirectoryFunction · 0.85
cleanupOldSessionEnvDirsFunction · 0.85
cleanupOldDebugLogsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected