-
Notifications
You must be signed in to change notification settings - Fork 16
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
IBX-5369: Fixed admin notifications request being queued too often #740
Conversation
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab. |
@@ -169,6 +169,10 @@ | |||
|
|||
modal.querySelectorAll(SELECTOR_MODAL_RESULTS).forEach((link) => link.addEventListener('click', handleModalResultsClick, false)); | |||
|
|||
getNotificationsStatus(); | |||
global.setInterval(getNotificationsStatus, INTERVAL); | |||
const loop = function loop() { |
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 think the variable name loop
is too generic
0f3952f
to
c1d9f08
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
Tested and validated on 4.4 experience FF Chrome
Merged up:
|
This PR replaces
setInterval
function call withsetTimeout
.This is done to prevent notification requests being queued regardless of the state of the previous request. For development environments, especially with multiple tabs open, this can cause local server to become overwhelmed by long-running requests, especially when clearing cache or performing other operations which require application container to be recompiled, like changing configuration.
Checklist:
$ composer fix-cs
)