add time to message, ad status info in worker table, fix subdef elastic flush

This commit is contained in:
aynsix
2020-05-14 18:48:00 +03:00
parent 67c8bf2125
commit 0b45ae377c
11 changed files with 219 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ namespace Alchemy\Phrasea\WorkerManager\Controller;
use Alchemy\Phrasea\Application as PhraseaApplication;
use Alchemy\Phrasea\Controller\Controller;
use Alchemy\Phrasea\Model\Repositories\WorkerRunningJobRepository;
use Alchemy\Phrasea\SearchEngine\Elastic\ElasticsearchOptions;
use Alchemy\Phrasea\WorkerManager\Event\PopulateIndexEvent;
use Alchemy\Phrasea\WorkerManager\Event\WorkerEvents;
@@ -63,6 +64,34 @@ class AdminConfigurationController extends Controller
]);
}
public function infoAction(PhraseaApplication $app, Request $request)
{
/** @var WorkerRunningJobRepository $repoWorker */
$repoWorker = $app['repo.worker-running-job'];
return $this->render('admin/worker-manager/worker_info.html.twig', [
'workerRunningJob' => $repoWorker->findAll()
]);
}
public function truncateTableAction(PhraseaApplication $app, Request $request)
{
/** @var WorkerRunningJobRepository $repoWorker */
$repoWorker = $app['repo.worker-running-job'];
$repoWorker->truncateWorkerTable();
return $app->redirectPath('worker_admin');
}
public function deleteFinishedAction(PhraseaApplication $app, Request $request)
{
/** @var WorkerRunningJobRepository $repoWorker */
$repoWorker = $app['repo.worker-running-job'];
$repoWorker->deleteFinishedWorks();
return $app->redirectPath('worker_admin');
}
public function searchengineAction(PhraseaApplication $app, Request $request)
{
$options = $this->getElasticsearchOptions();