feat(scheduler): dispatch event on job failure, notify admins via notifications module
Add ?ModuleEventDispatcher to SchedulerRunService (fail-open, nullable). Dispatch scheduler.job_failed event when a job fails with payload: job_id, job_key, label, error_code, error_message, trigger_type. New SchedulerJobFailedNotificationListener in notifications module creates in-app admin notifications for users with JOBS_MANAGE permission, scoped per tenant, with 30-min dedup per job_key. Also fixes audit module manifest: system_audit_purge job_key was mismatched (audit_system_purge vs system_audit_purge in DB). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,9 @@ return [
|
||||
'user.assignment_changed' => [
|
||||
['class' => \MintyPHP\Module\Notifications\Listeners\UserAssignmentChangedNotificationListener::class, 'method' => 'handle'],
|
||||
],
|
||||
'scheduler.job_failed' => [
|
||||
['class' => \MintyPHP\Module\Notifications\Listeners\SchedulerJobFailedNotificationListener::class, 'method' => 'handle'],
|
||||
],
|
||||
],
|
||||
|
||||
'scheduler_jobs' => [
|
||||
|
||||
Reference in New Issue
Block a user