Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not process already process messages with a custom strategy #159

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

lunetics
Copy link
Member

See #156

There was no check in the InvokeStrategy if a message was already handled

@lunetics lunetics force-pushed the fix_invoker branch 5 times, most recently from f4f180b to afa40e8 Compare April 24, 2017 13:45
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.102% when pulling afa40e8 on lunetics:fix_invoker into 330f200 on prooph:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.102% when pulling afa40e8 on lunetics:fix_invoker into 330f200 on prooph:master.

@@ -27,6 +27,10 @@ function (ActionEvent $actionEvent): void {
$message = $actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE);
$handlers = $actionEvent->getParam(EventBus::EVENT_PARAM_EVENT_LISTENERS, []);

if ($actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_HANDLED, false)) {
Copy link
Member

Choose a reason for hiding this comment

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

move this code up, message and handlers don't need to get fetched before this check.

@@ -30,6 +30,10 @@ function (ActionEvent $actionEvent): void {

$deferred = $actionEvent->getParam(QueryBus::EVENT_PARAM_DEFERRED);

if ($actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_HANDLED, false)) {
Copy link
Member

Choose a reason for hiding this comment

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

move this code up, finder, query and deferred don't need to get fetched before this check.

@@ -26,6 +26,10 @@ function (ActionEvent $actionEvent): void {
$message = $actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE);
Copy link
Member

Choose a reason for hiding this comment

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

move this code up, message and handlers don't need to get fetched before this check.

@prolic prolic self-assigned this Apr 24, 2017
@prolic prolic added the bug label Apr 24, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.102% when pulling 6409680 on lunetics:fix_invoker into 330f200 on prooph:master.

@prolic prolic merged commit 280eb61 into prooph:master Apr 24, 2017
@prolic
Copy link
Member

prolic commented Apr 24, 2017

Thanks. Will release new version tomorrow.

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

Successfully merging this pull request may close these issues.

3 participants