PHRAS-4057: log_doc - report mark as "cancel" for running_job entry (#4501)

* log_docs mark as canceled too

* PHRAS-4058 auto cancelling job

* add auto-cancelingJob in hour in the config

* add patch rc12
This commit is contained in:
Aina Sitraka
2024-04-30 12:44:14 +03:00
committed by GitHub
parent 7e3fe51a2c
commit b0eba5217c
8 changed files with 157 additions and 5 deletions

View File

@@ -165,7 +165,10 @@ class AlchemyWorkerServiceProvider implements PluginProviderInterface
}));
$app['alchemy_worker.type_based_worker_resolver']->addFactory(MessagePublisher::MAIN_QUEUE_TYPE, new CallableWorkerFactory(function () use ($app) {
return new MainQueueWorker($app['alchemy_worker.message.publisher'], $app['repo.worker-job']);
return (new MainQueueWorker($app['alchemy_worker.message.publisher'], $app['repo.worker-job'], $app['repo.worker-running-job'], $app['conf']))
->setDataboxLoggerLocator($app['phraseanet.logger'])
->setApplicationBox($app['phraseanet.appbox'])
;
}));
$app['alchemy_worker.type_based_worker_resolver']->addFactory(MessagePublisher::FTP_TYPE, new CallableWorkerFactory(function () use ($app) {

View File

@@ -22,7 +22,9 @@ class ControllerServiceProvider implements ControllerProviderInterface, ServiceP
public function register(Application $app)
{
$app['controller.worker.admin.configuration'] = $app->share(function (PhraseaApplication $app) {
return new AdminConfigurationController($app);
return (new AdminConfigurationController($app))
->setDataboxLoggerLocator($app['phraseanet.logger'])
;
});
// example of route to check webhook