Enables automatic purging of old metadata records for high-frequency system trains. By default, cleans up ManifestManagerTrain and MetadataCleanupTrain metadata. Additional train types can be added via the configure callback.
Only metadata in a terminal state (Completed, Failed, or Cancelled) older than RetentionPeriod is deleted. Pending and InProgress metadata is never cleaned up.
The cleanup service runs as an IHostedService on the configured CleanupInterval.
ManifestManagerTrain and MetadataCleanupTrain are always included in the cleanup whitelist by default. You don’t need to add them manually.
Train type names are matched against the name column in the metadata table (which stores the interface FullName, the canonical train name).