make delayed queue connfigurable

This commit is contained in:
aynsix
2020-05-13 17:29:45 +03:00
parent 8ace8aeab7
commit daf059d03f
7 changed files with 135 additions and 76 deletions

View File

@@ -21,7 +21,12 @@ class AdminConfigurationController extends Controller
{
public function indexAction(PhraseaApplication $app, Request $request)
{
return $this->render('admin/worker-manager/index.html.twig');
/** @var AMQPConnection $serverConnection */
$serverConnection = $this->app['alchemy_worker.amqp.connection'];
return $this->render('admin/worker-manager/index.html.twig', [
'isConnected' => ($serverConnection->getChannel() != null) ? true : false
]);
}
/**
@@ -48,6 +53,7 @@ class AdminConfigurationController extends Controller
$serverConnection = $this->app['alchemy_worker.amqp.connection'];
// change the queue TTL
$serverConnection->reinitializeQueue($retryQueuesToReset);
$serverConnection->reinitializeQueue(AMQPConnection::$defaultDelayedQueues);
return $app->redirectPath('worker_admin');
}