Commit 5a266c9a authored by Andreas Wolf's avatar Andreas Wolf

[TASK] #279: Add start/finish log messages to tasks

parent 3d4a6f88
Pipeline #2745 passed with stages
in 5 minutes and 33 seconds
......@@ -49,6 +49,8 @@ class CheckForExpiredExtensions extends Task
{
$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Task CheckForExpiredExtensions started');
$this->blacklistUsers = [
'abandoned_extensions',
'typo3v4',
......@@ -70,6 +72,8 @@ class CheckForExpiredExtensions extends Task
// remove expired extensions
$this->removeExpiredExtensions();
$this->logger->info('Task CheckForExpiredExtensions finished');
return true;
}
......
......@@ -15,7 +15,9 @@ namespace T3o\TerFe2\Task;
* The TYPO3 project - inspiring people to share!
*/
use Psr\Log\LoggerInterface;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Extbase\Scheduler\Task;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
......@@ -70,6 +72,11 @@ class CheckForOutdatedExtensions extends Task
*/
protected $solrIndexQueue;
/**
* @var LoggerInterface
*/
protected $logger;
/**
* Initialize Task
*
......@@ -95,6 +102,9 @@ class CheckForOutdatedExtensions extends Task
*/
public function execute()
{
$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Task CheckForOutdatedExtensions started');
$this->initializeTask();
......@@ -110,6 +120,8 @@ class CheckForOutdatedExtensions extends Task
$this->checkVersion($version);
}
$this->logger->info('Task CheckForOutdatedExtensions finished');
return true;
}
......
......@@ -53,6 +53,8 @@ class ImportExtensionsFromQueueTask extends Task
{
$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Task ImportExtensionsFromQueueTask started');
$extensionsFromQueue = $this->getExtensionsFromQueue();
// finish task if no extensions in queue
......@@ -85,6 +87,8 @@ class ImportExtensionsFromQueueTask extends Task
$this->removeExtensionFromQueue($ext['extensionuid']);
}
$this->logger->info('Task ImportExtensionsFromQueueTask finished');
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment