Infrastructure low complexity backend
1
Dependencies
0
Dependents
3
Entities
0
Integrations

Description

Scheduled background job that enforces the configurable log retention policy by deleting entries older than the configured threshold. Requires explicit admin approval before each run. Logs its own deletion actions to a system-level audit trail.

Feature: Audit Log

audit-retention-job

Responsibilities

  • Read retention policy from organization settings
  • Delete expired audit log entries in batches to avoid lock contention
  • Require admin approval token before executing destructive operation
  • Record retention run metadata (rows deleted, timestamp, approver) to system log

Interfaces

run(organizationId: string, approvalToken: string): Promise<RetentionRunResult>
preview(organizationId: string): Promise<RetentionPreview>

Relationships

Dependencies (1)

Components this component depends on

Related Data Entities (3)

Data entities managed by this component