chore: adjust schedule for XML cleanup to run more often
This commit is contained in:
@@ -10,8 +10,8 @@ zenstruck_schedule:
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- task: app:cleanup:xml-dumps
|
- task: app:cleanup:xml-dumps
|
||||||
frequency: '0 1 * * *'
|
frequency: '0 */6 * * *'
|
||||||
description: "Removes XML dumps of BPN requests/responses older than a week"
|
description: "Removes outdated XML dumps of BPN requests/responses"
|
||||||
|
|
||||||
- task: league:oauth2-server:clear-expired-tokens
|
- task: league:oauth2-server:clear-expired-tokens
|
||||||
frequency: '0 * * * *'
|
frequency: '0 * * * *'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||||||
|
|
||||||
#[AsCommand(
|
#[AsCommand(
|
||||||
name: 'app:cleanup:xml-dumps',
|
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
|
class CleanupXMLDumpsCommand extends Command
|
||||||
{
|
{
|
||||||
@@ -30,7 +30,7 @@ class CleanupXMLDumpsCommand extends Command
|
|||||||
$io = new SymfonyStyle($input, $output);
|
$io = new SymfonyStyle($input, $output);
|
||||||
|
|
||||||
// we look for files older than 1 week
|
// we look for files older than 1 week
|
||||||
$maxDate = (new \DateTimeImmutable())->modify('-1 week')->getTimestamp();
|
$maxDate = (new \DateTimeImmutable())->modify('-3 day')->getTimestamp();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$files = $this
|
$files = $this
|
||||||
|
|||||||
Reference in New Issue
Block a user