Skip to content

Commit

Permalink
allow execution of monitor even when queue is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Dec 15, 2015
1 parent 064ed9a commit 3c0874c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 4 additions & 5 deletions Commands/Monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ protected function execute(InputInterface $input, OutputInterface $output)

$settings = Queue\Factory::getSettings();

if (!$settings->queueEnabled->getValue()) {
$output->writeln('Queue is disabled');
return;
if ($settings->queueEnabled->getValue()) {
$output->writeln('Queue is enabled');
} else {
$output->writeln('<comment>' . strtoupper('Queue is disabled: ') . 'No new requests will be written into the queue, processing the remaining requests is still possible.</comment>');
}

$output->writeln('Queue is enabled');

$backend = Queue\Factory::makeBackend();
$manager = Queue\Factory::makeQueueManager($backend);
$queues = $manager->getAllQueues();
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ __What if I want to disable the queue?__

You might want to disable the queue at some point but there are still some pending requests in the queue. We recommend to
change the "Number of requests to process" in plugin settings to "1" and process all requests using the command
`./console queuedtracking:process` shortly before disabling the queue and directly afterwards.
`./console queuedtracking:process` shortly before disabling the queue and directly afterwards. It is still possible to
process remaining request once the queue is disabled but new tracking requests won't be written into the queue.

__How can I access Redis data?__

Expand Down Expand Up @@ -133,9 +134,13 @@ __Are there any known issues?__

## Changelog

0.2.4

- The command `queuedtracking:monitor` will now work even when the queue is disabled

0.2.3

- Added more tests and information to the `test` command
- Added more tests and information to the `queuedtracking:test` command
- It is now possible to configure up to 16 workers

0.2.2
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "QueuedTracking",
"version": "0.2.3",
"version": "0.2.4",
"description": "Scale your large traffic Piwik service by queuing tracking requests in Redis for better performance. ",
"theme": false,
"keywords": ["tracker", "tracking", "queue", "redis"],
Expand Down

0 comments on commit 3c0874c

Please sign in to comment.