allow a zero time-limit

This commit is contained in:
Fritz Michael Gschwantner 2022-01-06 12:44:55 +00:00 committed by GitHub
parent 93ed7c3e38
commit 2668c0db2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ EOF
$this->eventDispatcher->addSubscriber(new StopWorkerOnMemoryLimitListener($this->convertToBytes($memoryLimit), $this->logger));
}
if ($timeLimit = $input->getOption('time-limit')) {
if (null !== ($timeLimit = $input->getOption('time-limit'))) {
$stopsWhen[] = "been running for {$timeLimit}s";
$this->eventDispatcher->addSubscriber(new StopWorkerOnTimeLimitListener($timeLimit, $this->logger));
}