You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$memory = $backend->getMemoryStats(); // I know this will only work with redis currently as it is not defined in backend interface etc. needs to be refactored once we add another backend
@@ -54,7 +54,6 @@ protected function doExecute(): int
54
54
$output->writeln(var_export($requests, 1));
55
55
56
56
$output->writeln(sprintf('<info>These were the requests of queue %s. Use <comment>--queue-id=%s</comment> to print only information for this queue.</info>', $thisQueueId, $thisQueueId));
Copy file name to clipboardExpand all lines: Commands/Process.php
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
<?php
2
+
2
3
/**
3
4
* Matomo - free/libre analytics platform
4
5
*
@@ -20,16 +21,26 @@
20
21
21
22
class Process extends ConsoleCommand
22
23
{
23
-
24
24
protectedfunctionconfigure()
25
25
{
26
26
$this->setName('queuedtracking:process');
27
-
$this->addRequiredValueOption('queue-id', null, 'If set, will only work on that specific queue. For example "0" or "1" (if there are multiple queues). Not recommended when only one worker is in use. If for example 4 workers are in use, you may want to use 0, 1, 2, or 3.');
28
-
$this->addRequiredValueOption('force-num-requests-process-at-once', null, 'If defined, it overwrites the setting of how many requests will be picked out of the queue and processed at once. Must be a number which is >= 1. By default, the configured value from the settings will be used. This can be useful for example if you want to process every single request within the queue. If otherwise a batch size of say 100 is configured, then there may be otherwise 99 requests left in the queue. It can be also useful for testing purposes.');
27
+
$this->addRequiredValueOption(
28
+
'queue-id',
29
+
null,
30
+
'If set, will only work on that specific queue. For example "0" or "1" (if there are multiple queues). Not recommended when only one worker is in use. If for example 4 workers are in use, you may want to use 0, 1, 2, or 3.'
31
+
);
32
+
$this->addRequiredValueOption(
33
+
'force-num-requests-process-at-once',
34
+
null,
35
+
'If defined, it overwrites the setting of how many requests will be picked out of the queue and processed at once. Must be a number which is >= 1. By default, the configured value from the settings will be used.' .
36
+
' This can be useful for example if you want to process every single request within the queue.' .
37
+
' If otherwise a batch size of say 100 is configured, then there may be otherwise 99 requests left in the queue. It can be also useful for testing purposes.'
38
+
);
29
39
$this->addRequiredValueOption('cycle', 'c', 'The proccess will automatically loop for "n" cycle time(s), set "0" to infinite.', 1);
30
40
$this->addRequiredValueOption('sleep', 's', 'Take a nap for "n" second(s) before recycle, minimum is 1 second.', 1);
31
41
$this->addRequiredValueOption('delay', 'd', 'Delay before finished', 0);
32
-
$this->setDescription('Processes all queued tracking requests in case there are enough requests in the queue and in case they are not already in process by another script. To keep track of the queue use the <comment>--verbose</comment> option or execute the <comment>queuedtracking:monitor</comment> command.');
42
+
$this->setDescription('Processes all queued tracking requests in case there are enough requests in the queue and in case they are not already in process by another script. To keep track of the queue use the <comment>--verbose</comment>' .
43
+
' option or execute the <comment>queuedtracking:monitor</comment> command.');
33
44
}
34
45
35
46
/**
@@ -91,7 +102,7 @@ protected function doExecute(): int
if ($evictionPolicy !== 'allkeys-lru' && $evictionPolicy !== 'noeviction') {
115
-
$output->writeln('<error>The eviction policy can likely lead to errors when memory is low. We recommend to use eviction policy <comment>allkeys-lru</comment> or alternatively <comment>noeviction</comment>. Read more here: http://redis.io/topics/lru-cache</error>');
115
+
$output->writeln(
116
+
'<error>The eviction policy can likely lead to errors when memory is low. We recommend to use eviction policy <comment>allkeys-lru</comment> or alternatively <comment>noeviction</comment>.' .
117
+
' Read more here: http://redis.io/topics/lru-cache</error>'
0 commit comments