mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 02:51:04 +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).
|
||||
* Only for admins.
|
||||
*/
|
||||
public function checkQueueAction()
|
||||
{
|
||||
$nbRedisMessages = 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')) {
|
||||
$nbRabbitMessages = $this->getTotalMessageInRabbitQueue('pocket')
|
||||
+ $this->getTotalMessageInRabbitQueue('readability')
|
||||
|
|
Loading…
Reference in a new issue