Skip to content

Commit ac4429a

Browse files
committed
bug symfony#31632 [Messenger] Use "real" memory usage to honor --memory-limit (chalasr)
This PR was merged into the 4.2 branch. Discussion ---------- [Messenger] Use "real" memory usage to honor --memory-limit | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#29957 | License | MIT | Doc PR | n/a At least it's consistent with what other daemon-based libraries do: https://github.com/php-enqueue/enqueue-dev/blob/master/pkg/enqueue/Consumption/Extension/LimitConsumerMemoryExtension.php#L58 https://github.com/M6Web/DaemonBundle/blob/master/src/M6Web/Bundle/DaemonBundle/Command/DaemonCommand.php#L493 Commits ------- fbfe2df [Messenger] Use real memory usage for --memory-limit
2 parents 81f6f3b + fbfe2df commit ac4429a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Messenger/Transport/Receiver/StopWhenMemoryUsageIsExceededReceiver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(ReceiverInterface $decoratedReceiver, int $memoryLim
3232
$this->memoryLimit = $memoryLimit;
3333
$this->logger = $logger;
3434
$this->memoryResolver = $memoryResolver ?: function () {
35-
return \memory_get_usage();
35+
return \memory_get_usage(true);
3636
};
3737
}
3838

0 commit comments

Comments
 (0)