feat(logging): implement log pruning functionality

- Add LogPruneService to handle the deletion of old logs based on retention settings.
- Create PruneLogsCommand to provide a console command for log pruning.
- Introduce PruneLogsMessage and PruneLogsHandler for message handling related to log pruning.
- Update the AST cache with new classes and their relationships.
This commit is contained in:
hamed
2026-07-01 21:50:51 +03:30
parent a31e8b4314
commit 7814bcc0de
27 changed files with 1667 additions and 802 deletions
+4
View File
@@ -3,6 +3,7 @@
namespace App;
use App\Appointment\Message\ExpireAppointmentsMessage;
use App\Shared\Logging\Message\PruneLogsMessage;
use Symfony\Component\Scheduler\Attribute\AsSchedule;
use Symfony\Component\Scheduler\RecurringMessage;
use Symfony\Component\Scheduler\Schedule as SymfonySchedule;
@@ -24,6 +25,9 @@ class Schedule implements ScheduleProviderInterface
->processOnlyLastMissedRun(true) // ensure only last missed task is run
->add(
RecurringMessage::every('1 minute', new ExpireAppointmentsMessage())
)
->add(
RecurringMessage::every('1 day', new PruneLogsMessage())
);
}
}