major update
This commit is contained in:
@@ -3,12 +3,15 @@
|
||||
namespace MintyPHP\Service\Scheduler;
|
||||
|
||||
use MintyPHP\Service\Scheduler\Handler\ScheduledJobHandlerInterface;
|
||||
use MintyPHP\Service\Scheduler\Handler\SystemAuditPurgeJobHandler;
|
||||
use MintyPHP\Service\Scheduler\Handler\UserLifecycleJobHandler;
|
||||
use MintyPHP\Service\Audit\SystemAuditService;
|
||||
use MintyPHP\Service\User\UserLifecycleService;
|
||||
|
||||
class ScheduledJobRegistry
|
||||
{
|
||||
public const USER_LIFECYCLE_RUN = 'user_lifecycle_run';
|
||||
public const SYSTEM_AUDIT_PURGE = 'system_audit_purge';
|
||||
|
||||
/**
|
||||
* Maps job_key => handler instance (must implement ScheduledJobHandlerInterface).
|
||||
@@ -24,10 +27,14 @@ class ScheduledJobRegistry
|
||||
*/
|
||||
private array $handlers;
|
||||
|
||||
public function __construct(UserLifecycleService $userLifecycleService)
|
||||
public function __construct(
|
||||
UserLifecycleService $userLifecycleService,
|
||||
SystemAuditService $systemAuditService
|
||||
)
|
||||
{
|
||||
$this->handlers = [
|
||||
self::USER_LIFECYCLE_RUN => new UserLifecycleJobHandler($userLifecycleService),
|
||||
self::SYSTEM_AUDIT_PURGE => new SystemAuditPurgeJobHandler($systemAuditService),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user