Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Update stats for BackendHealthCheck in case of doctrine backend is used #325

Merged
merged 1 commit into from
Apr 25, 2018

Conversation

qsomazzi
Copy link
Member

Changelog

### Fixed
- Data fetched from stats counts are now properly manipulated (in case of doctrine backend is used)
- Typo in message status

Subject

The goal of this PR is to fix the way data are manipulated in the case of doctrine backend is used. An SQL query fetch the stats but it raise an error.

Before
In the foreach $data = '-2'

After
In the while $data = ['state' => -2, 'cnt' => 3]

@@ -97,7 +97,7 @@ public function handle(MessageInterface $message, EventDispatcherInterface $disp
*/
public function getStatus()
{
return new Success('Channel is running (RabbitMQ) and consumers for all queues available.');
return new Success('Channel is running (Database) and consumers for all queues available.');
Copy link
Contributor

@kunicmarko20 kunicmarko20 Apr 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if someone is testing this message?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will break indeed, but it was a wrong one

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do others think? cc @sonata-project/contributors

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it was wrong, Imo lets change it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good enough for me, let's merge it then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kunicmarko20 everything is a BC-break, see my favorite xkcd ;)

@jordisala1991 jordisala1991 requested a review from a team April 25, 2018 17:33
@greg0ire greg0ire merged commit 0c35bd6 into sonata-project:3.x Apr 25, 2018
@greg0ire
Copy link
Contributor

Thanks @qsomazzi !

@qsomazzi qsomazzi deleted the heath_check branch April 26, 2018 07:13
@qsomazzi
Copy link
Member Author

@sonata-project/contributors thanks !
@soullivaneuh can you create a new release please ? (when you got time, no rush)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants