mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Only display message in queue for admin
Instead of for EVERYONE
This commit is contained in:
parent
ac87e0db2a
commit
4fc998245c
1 changed files with 8 additions and 0 deletions
|
@ -19,12 +19,20 @@ class ImportController extends Controller
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display how many messages are queue (both in Redis and RabbitMQ).
|
* Display how many messages are queue (both in Redis and RabbitMQ).
|
||||||
|
* Only for admins.
|
||||||
*/
|
*/
|
||||||
public function checkQueueAction()
|
public function checkQueueAction()
|
||||||
{
|
{
|
||||||
$nbRedisMessages = null;
|
$nbRedisMessages = null;
|
||||||
$nbRabbitMessages = null;
|
$nbRabbitMessages = null;
|
||||||
|
|
||||||
|
if (!$this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) {
|
||||||
|
return $this->render('WallabagImportBundle:Import:check_queue.html.twig', [
|
||||||
|
'nbRedisMessages' => $nbRedisMessages,
|
||||||
|
'nbRabbitMessages' => $nbRabbitMessages,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
|
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
|
||||||
$nbRabbitMessages = $this->getTotalMessageInRabbitQueue('pocket')
|
$nbRabbitMessages = $this->getTotalMessageInRabbitQueue('pocket')
|
||||||
+ $this->getTotalMessageInRabbitQueue('readability')
|
+ $this->getTotalMessageInRabbitQueue('readability')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue