Jobs setup

This commit is contained in:
2023-06-12 21:14:07 -04:00
parent 03c1dac2f2
commit 88f91c4bd5
60 changed files with 965 additions and 495 deletions

View File

@ -33,5 +33,8 @@ return [
$container->get(ProVM\Common\Factory\Model::class),
$container->get('model_list')
);
},
ProVM\Common\Service\Auth::class => function(ContainerInterface $container) {
return new ProVM\Common\Service\Auth($container->get('api_key'));
}
];

View File

@ -8,9 +8,11 @@ return [
'Mailbox' => ProVM\Emails\Repository\Mailbox::class,
'Message' => ProVM\Emails\Repository\Message::class,
'Attachment' => ProVM\Emails\Repository\Attachment::class,
'Job' => ProVM\Emails\Repository\Job::class,
"State\\Mailbox" => ProVM\Emails\Repository\State\Mailbox::class,
"State\\Message" => ProVM\Emails\Repository\State\Message::class,
"State\\Attachment" => ProVM\Emails\Repository\State\Attachment::class
"State\\Attachment" => ProVM\Emails\Repository\State\Attachment::class,
"State\\Job" => ProVM\Emails\Repository\State\Job::class,
]);
}
];

View File

@ -6,7 +6,7 @@ return [
return new ProVM\Common\Middleware\Auth(
$container->get(Nyholm\Psr7\Factory\Psr17Factory::class),
$container->get(Psr\Log\LoggerInterface::class),
$container->get('api_key')
$container->get(ProVM\Common\Service\Auth::class)
);
}
];

View File

@ -11,8 +11,7 @@ return [
];
},
'request_log_handler' => function(ContainerInterface $container) {
return (new Monolog\Handler\RotatingFileHandler(implode(DIRECTORY_SEPARATOR, [$container->get('logs_folder'), 'requests.log'])))
->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true));
return (new Monolog\Handler\RotatingFileHandler(implode(DIRECTORY_SEPARATOR, [$container->get('logs_folder'), 'requests.log'])));
},
'request_logger' => function(ContainerInterface $container) {
return new Monolog\Logger(