Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2bfac0d

Browse filesBrowse files
bug #53730 [Messenger] [Beanstalkd] fix tube stats when it's empty (eminjk)
This PR was submitted for the 6.4 branch but it was merged into the 5.4 branch instead. Discussion ---------- [Messenger] [Beanstalkd] fix tube stats when it's empty | Q | A | ------------- | --- | Branch? | 6.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix #53526 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> When Beanstalkd's tube was empty `messenger:stats` commands throws an `NOT_FOUND` error instead of 0. Initializing tube before retrieving tube stats force beanstalkd to created it and then it returns proper value. Commits ------- 22e105d prevent throwing NOT_FOUND error when tube is empty
2 parents f129e3b + 22e105d commit 2bfac0d
Copy full SHA for 2bfac0d

File tree

1 file changed

+1
-0
lines changed
Filter options
  • src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport

1 file changed

+1
-0
lines changed

‎src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/Connection.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/Connection.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ public function reject(string $id): void
182182
public function getMessageCount(): int
183183
{
184184
try {
185+
$this->client->useTube($this->tube);
185186
$tubeStats = $this->client->statsTube($this->tube);
186187
} catch (Exception $exception) {
187188
throw new TransportException($exception->getMessage(), 0, $exception);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.