From 1e65dcaaf5092afb01903019932bd42439bb7fe2 Mon Sep 17 00:00:00 2001 From: diosmosis Date: Tue, 26 Nov 2019 17:25:48 -0800 Subject: [PATCH] Set tracker debug flag before tracker environment is created. --- Commands/Process.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Commands/Process.php b/Commands/Process.php index 5a63041..868f8f2 100644 --- a/Commands/Process.php +++ b/Commands/Process.php @@ -10,11 +10,8 @@ namespace Piwik\Plugins\QueuedTracking\Commands; use Piwik\Application\Environment; -use Piwik\Cache; -use Piwik\Container\StaticContainer; use Piwik\Log; use Piwik\Piwik; -use Piwik\Plugin; use Piwik\Plugin\ConsoleCommand; use Piwik\Plugins\QueuedTracking\Queue; use Piwik\Plugins\QueuedTracking\Queue\Processor; @@ -52,6 +49,10 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->writeln("Forcing queue ID: " . $queueId); } + if (OutputInterface::VERBOSITY_VERY_VERBOSE <= $output->getVerbosity()) { + $GLOBALS['PIWIK_TRACKER_DEBUG'] = true; + } + $trackerEnvironment = new Environment('tracker'); $trackerEnvironment->init(); @@ -60,10 +61,6 @@ protected function execute(InputInterface $input, OutputInterface $output) $trackerEnvironment->getContainer()->get('Piwik\Plugin\Manager')->setTrackerPluginsNotToLoad(array('Provider')); Tracker::loadTrackerEnvironment(); - if (OutputInterface::VERBOSITY_VERY_VERBOSE <= $output->getVerbosity()) { - $GLOBALS['PIWIK_TRACKER_DEBUG'] = true; - } - $backend = Queue\Factory::makeBackend(); $queueManager = Queue\Factory::makeQueueManager($backend); $queueManager->setForceQueueId($queueId);