Running the worker 

Since version 14 the Crawler uses the TYPO3 message bus instead of its own queue processing. Every URL added to the queue results in a AOECrawlerQueueMessageCrawlUrlMessage, which is sent to one of three Doctrine transports (stored in the table sys_messenger_messages), depending on the priority of the page, see Priority Crawling:

  • crawler_high
  • crawler
  • crawler_low

The messages are processed by a worker. The order of the transports is important, the worker always processes the messages of the first transport before it looks at the next one:

vendor/bin/typo3 messenger:consume crawler_high crawler crawler_low
Copied!

Several workers can run at the same time, the transports make sure that every message is only processed once.

Run the worker with a cron-job 

If you can't run a long-running process, start the worker from a cron-job and let it stop before the next run starts:

*/5 * * * * vendor/bin/typo3 messenger:consume crawler_high crawler crawler_low --time-limit=270 > /dev/null
Copied!

The same command can also be configured as a scheduler task, see Scheduler.

Routing 

The Crawler routes its messages to the crawler transport in its ext_localconf.php. As long as this routing is used, the messages are sent to the transport matching their priority. The routing can be changed in config/system/settings.php or config/system/additional.php, e.g. to crawl synchronously while debugging:

config/system/additional.php
$GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing'][\AOE\Crawler\Queue\Message\CrawlUrlMessage::class] = 'default';
Copied!

With the default (synchronous) transport, every URL is crawled at the moment it is added to the queue, which is not recommended for larger sites. When the routing is changed, the priority of the pages is not taken into account.