-
Notifications
You must be signed in to change notification settings - Fork 10
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
Remove event aggregator #852
base: feature/TAO-10203-advanced-search
Are you sure you want to change the base?
Remove event aggregator #852
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
$eventAggregator = $this->getServiceManager()->get(EventAggregator::SERVICE_ID); | ||
$eventAggregator->put($this->getUri(), new ResourceUpdated($this)); | ||
$eventManager = $this->getServiceManager()->get(EventManager::SERVICE_ID); | ||
$eventManager->trigger(new ResourceUpdated($this)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it executes the event, before It seems it just aggregated by URI, so when one URI is used, all the events are triggered. Will we have same behavior now? Why did we change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have changed it because it is deferring event and we do not know what it will imply, it is a breaking changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After @andreluizmachado answer would we keep the removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say yes, he confirms that this service tries to improve the taskqueue mechanism and avoid multiple calls based on events.
This workaround is good but the problem stay the same. I can close it, but number of triggered events will not changed (only the emition)
And, as discussed with @andreluizmachado , this fix is changing behavior of eventManager for the whole platform and can create side effect. Need to be confirmed by regression tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- New code is covered by tests (if applicable)
- Tests are running successfully (old and new ones) on my local machine (if applicable)
- New code is respecting code style rules
- New code is respecting best practices
- New code is not subject to concurrency issues (if applicable)
- Feature is working correctly on my local machine (if applicable)
- Acceptance criteria are respected
- Pull request title and description are meaningful
This PR aims to delete
eventAggregator
.After investigation, this service aggregate events and iterate on it to emit them. It also defer emission that is a breaking change, especially for
core_kernel_classes_Resource