Skip to content
Corex

SubmissionExportRetention

Corex\Config\Submissions\SubmissionExportRetention · class · Config layer

How long an exported file is kept (spec 103, FR-030). An export is a copy of people’s answers sitting on the server. It is kept long enough to be downloaded again and then removed: the file goes, the entry in the history stays. The daily retention sweep does the removing, with every other store it cleans. An export’s expiry is not stored. It is this period counted from the day the export was made, so the date the history shows and the day the sweep removes the file cannot disagree.

__construct(SubmissionExportStore $exports, Closure $now)

Section titled “__construct(SubmissionExportStore $exports, Closure $now)”

expiryOf(SubmissionExportRun $run): DateTimeImmutable

Section titled “expiryOf(SubmissionExportRun $run): DateTimeImmutable”

hasExpired(SubmissionExportRun $run): bool

Section titled “hasExpired(SubmissionExportRun $run): bool”

pruneOlderThan(DateTimeImmutable $cutoff): int

Section titled “pruneOlderThan(DateTimeImmutable $cutoff): int”