docs(core): Update pruning service docline (#12282)

This commit is contained in:
Iván Ovejero 2024-12-18 20:05:00 +01:00 committed by GitHub
parent 0f1461f2d5
commit dc7864a86d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View file

@ -6,7 +6,7 @@ class PruningIntervalsConfig {
@Env('EXECUTIONS_DATA_PRUNE_HARD_DELETE_INTERVAL')
hardDelete: number = 15;
/** How often (minutes) execution data should be soft-deleted */
/** How often (minutes) execution data should be soft-deleted. */
@Env('EXECUTIONS_DATA_PRUNE_SOFT_DELETE_INTERVAL')
softDelete: number = 60;
}

View file

@ -13,9 +13,17 @@ import { Logger } from '@/logging/logger.service';
import { OrchestrationService } from '../orchestration.service';
/**
* Responsible for pruning executions from the database and their associated binary data
* from the filesystem, on a rolling basis. By default we soft-delete execution rows
* every cycle and hard-delete them and their binary data every 4th cycle.
* Responsible for deleting old executions from the database and deleting their
* associated binary data from the filesystem, on a rolling basis.
*
* By default:
*
* - Soft deletion (every 60m) identifies all prunable executions based on max
* age and/or max count, exempting annotated executions.
* - Hard deletion (every 15m) processes prunable executions in batches of 100,
* switching to 1s intervals until the total to prune is back down low enough,
* or in case the hard deletion fails.
* - Once mostly caught up, hard deletion goes back to the 15m schedule.
*/
@Service()
export class PruningService {