From 7b25fbf28bad5ab65990e40b1cef35c49439e97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 2 Sep 2025 09:29:36 +0200 Subject: [PATCH] chore: adjust schedule for XML cleanup to run more often --- config/packages/zenstruck_schedule.yaml | 4 ++-- src/Command/CleanupXMLDumpsCommand.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/packages/zenstruck_schedule.yaml b/config/packages/zenstruck_schedule.yaml index ff5c94f..846a994 100644 --- a/config/packages/zenstruck_schedule.yaml +++ b/config/packages/zenstruck_schedule.yaml @@ -10,8 +10,8 @@ zenstruck_schedule: tasks: - task: app:cleanup:xml-dumps - frequency: '0 1 * * *' - description: "Removes XML dumps of BPN requests/responses older than a week" + frequency: '0 */6 * * *' + description: "Removes outdated XML dumps of BPN requests/responses" - task: league:oauth2-server:clear-expired-tokens frequency: '0 * * * *' diff --git a/src/Command/CleanupXMLDumpsCommand.php b/src/Command/CleanupXMLDumpsCommand.php index d78655d..2c89cc4 100644 --- a/src/Command/CleanupXMLDumpsCommand.php +++ b/src/Command/CleanupXMLDumpsCommand.php @@ -14,7 +14,7 @@ use Symfony\Component\Console\Style\SymfonyStyle; #[AsCommand( name: 'app:cleanup:xml-dumps', - description: 'Removes XML dumps of BPN requests/responses older than a week' + description: 'Removes outdated XML dumps of BPN requests/responses' )] class CleanupXMLDumpsCommand extends Command { @@ -30,7 +30,7 @@ class CleanupXMLDumpsCommand extends Command $io = new SymfonyStyle($input, $output); // we look for files older than 1 week - $maxDate = (new \DateTimeImmutable())->modify('-1 week')->getTimestamp(); + $maxDate = (new \DateTimeImmutable())->modify('-3 day')->getTimestamp(); try { $files = $this