(workspaceIds: string[], label: string)
| 349 | } |
| 350 | |
| 351 | async function cleanupLargeValueMetadata(workspaceIds: string[], label: string): Promise<void> { |
| 352 | try { |
| 353 | const tombstonesDeletedBefore = new Date( |
| 354 | Date.now() - LARGE_VALUE_TOMBSTONE_RETENTION_HOURS * 60 * 60 * 1000 |
| 355 | ) |
| 356 | const result = await pruneLargeValueMetadata({ workspaceIds, tombstonesDeletedBefore }) |
| 357 | logger.info( |
| 358 | `[${label}/execution_large_value_metadata] Pruned ${result.referencesDeleted} stale references, ${result.dependenciesDeleted} dependencies, ${result.tombstonesDeleted} tombstones` |
| 359 | ) |
| 360 | } catch (error) { |
| 361 | logger.error(`[${label}/execution_large_value_metadata] Failed to prune metadata`, { error }) |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | async function cleanupWorkflowExecutionLogs( |
| 366 | workspaceIds: string[], |
no test coverage detected