Skip to content

Commit 2668c0d

Browse files
authored
allow a zero time-limit
1 parent 93ed7c3 commit 2668c0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
173173
$this->eventDispatcher->addSubscriber(new StopWorkerOnMemoryLimitListener($this->convertToBytes($memoryLimit), $this->logger));
174174
}
175175

176-
if ($timeLimit = $input->getOption('time-limit')) {
176+
if (null !== ($timeLimit = $input->getOption('time-limit'))) {
177177
$stopsWhen[] = "been running for {$timeLimit}s";
178178
$this->eventDispatcher->addSubscriber(new StopWorkerOnTimeLimitListener($timeLimit, $this->logger));
179179
}

0 commit comments

Comments
 (0)