1 | <?php |
||
29 | class tx_crawler_domain_process_manager |
||
30 | { |
||
31 | /** |
||
32 | * @var $timeToLive integer |
||
33 | */ |
||
34 | private $timeToLive; |
||
35 | |||
36 | /** |
||
37 | * @var integer |
||
38 | */ |
||
39 | private $countInARun; |
||
40 | |||
41 | /** |
||
42 | * @var integer |
||
43 | */ |
||
44 | private $processLimit; |
||
45 | |||
46 | /** |
||
47 | * @var $crawlerObj tx_crawler_lib |
||
48 | */ |
||
49 | private $crawlerObj; |
||
50 | |||
51 | /** |
||
52 | * @var $queueRepository tx_crawler_domain_queue_repository |
||
53 | */ |
||
54 | private $queueRepository; |
||
55 | |||
56 | /** |
||
57 | * @var tx_crawler_domain_process_repository |
||
58 | */ |
||
59 | private $processRepository; |
||
60 | |||
61 | /** |
||
62 | * @var $verbose boolean |
||
63 | */ |
||
64 | private $verbose; |
||
65 | |||
66 | /** |
||
67 | * the constructor |
||
68 | */ |
||
69 | public function __construct() |
||
70 | { |
||
71 | $this->processRepository = new tx_crawler_domain_process_repository(); |
||
72 | $this->queueRepository = new tx_crawler_domain_queue_repository(); |
||
73 | $this->crawlerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_crawler_lib'); |
||
|
|||
74 | $this->timeToLive = intval($this->crawlerObj->extensionSettings['processMaxRunTime']); |
||
75 | $this->countInARun = intval($this->crawlerObj->extensionSettings['countInARun']); |
||
76 | $this->processLimit = intval($this->crawlerObj->extensionSettings['processLimit']); |
||
77 | $this->verbose = intval($this->crawlerObj->extensionSettings['processVerbose']); |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * starts multiple processes |
||
82 | * |
||
83 | * @param integer $timeout |
||
84 | * |
||
85 | * @throws RuntimeException |
||
86 | */ |
||
87 | public function multiProcess($timeout) |
||
130 | } |
||
131 | } |
||
132 | |||
133 | /** |
||
134 | * Reports curent Status of queue |
||
135 | */ |
||
136 | protected function reportItemStatus() |
||
137 | { |
||
138 | echo 'Pending:' . $this->queueRepository->countAllPendingItems() . ' / Assigned:' . $this->queueRepository->countAllAssignedPendingItems() . chr(10); |
||
139 | } |
||
140 | |||
141 | /** |
||
142 | * according to the given count of pending items and the countInARun Setting this method |
||
143 | * starts more crawling processes |
||
144 | * @return boolean if processes are started |
||
145 | */ |
||
146 | private function startRequiredProcesses() |
||
172 | } |
||
173 | |||
174 | /** |
||
175 | * starts new process |
||
176 | * @throws Exception if no crawlerprocess was started |
||
177 | */ |
||
178 | public function startProcess() |
||
193 | } |
||
194 | } |
||
195 | |||
196 | /** |
||
197 | * Returns the path to start the crawler from the command line |
||
198 | * |
||
199 | * @return string |
||
200 | */ |
||
201 | public function getCrawlerCliPath() |
||
202 | { |
||
203 | $phpPath = $this->crawlerObj->extensionSettings['phpPath'] . ' '; |
||
204 | $pathToTypo3 = rtrim(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT'), '/'); |
||
205 | $pathToTypo3 .= rtrim(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'), '/'); |
||
206 | $cliPart = '/typo3/cli_dispatch.phpsh crawler'; |
||
207 | return $phpPath . $pathToTypo3 . $cliPart; |
||
210 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths