mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
PHRAS-3236 merge master into branch
This commit is contained in:
@@ -229,6 +229,29 @@ class AdminConfigurationController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function validationReminderAction(PhraseaApplication $app, Request $request)
|
||||
{
|
||||
$interval = $app['conf']->get(['workers', 'validationReminder', 'interval'], 7200);
|
||||
|
||||
if ($request->getMethod() == 'POST') {
|
||||
$reminderInterval = (int)$request->request->get('worker_reminder_interval');
|
||||
// save the period interval in second
|
||||
$app['conf']->set(['workers', 'validationReminder', 'interval'], $reminderInterval);
|
||||
|
||||
/** @var AMQPConnection $serverConnection */
|
||||
$serverConnection = $this->app['alchemy_worker.amqp.connection'];
|
||||
// reinitialize the validation reminder queues
|
||||
$serverConnection->reinitializeQueue([MessagePublisher::VALIDATION_REMINDER_QUEUE]);
|
||||
$this->app['alchemy_worker.message.publisher']->initializeLoopQueue(MessagePublisher::VALIDATION_REMINDER_TYPE);
|
||||
|
||||
return $app->redirectPath('worker_admin');
|
||||
}
|
||||
|
||||
return $this->render('admin/worker-manager/worker_validation_reminder.html.twig', [
|
||||
'interval' => $interval
|
||||
]);
|
||||
}
|
||||
|
||||
public function populateStatusAction(PhraseaApplication $app, Request $request)
|
||||
{
|
||||
$databoxIds = $request->get('sbasIds');
|
||||
@@ -255,7 +278,7 @@ class AdminConfigurationController extends Controller
|
||||
|
||||
// reinitialize the pull queues
|
||||
$serverConnection->reinitializeQueue([MessagePublisher::PULL_QUEUE]);
|
||||
$this->app['alchemy_worker.message.publisher']->initializePullAssets();
|
||||
$this->app['alchemy_worker.message.publisher']->initializeLoopQueue(MessagePublisher::PULL_ASSETS_TYPE);
|
||||
|
||||
return $app->redirectPath('worker_admin');
|
||||
}
|
||||
|
Reference in New Issue
Block a user