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:
@@ -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())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user