Open
Conversation
emilysallstrom
approved these changes
Feb 6, 2026
| * used to be switchMap | ||
| * exhaustMap ignores new emissions from the source while the current inner observable is still active. | ||
| * | ||
| * This ensures that we do not start a new poll request until the previous one has completed, |
Collaborator
There was a problem hiding this comment.
I like the comment adding why we added this 👍
Collaborator
Author
There was a problem hiding this comment.
Yeah, selfishly, I know if I didn't leave that comment in there, I wouldn't know why exhaustMap was used when visiting the code later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today the widget polls for members and jobs every 3 seconds. This adds some experimental configurability, and we'll use it to test different timings (2000ms and 1000ms polling)
Additions
New configurable polling time
Changes
switchMapis nowexhaustMapin our pollers, which allows a request to finish before polling again when the interval is hit. This switch 😄 was made because if the polling is too fast the widget will not parse the response before making a new request... It would get stuck permanently in a request-but-no-response loop. (I observed this locally when testing an interval time that was too fast for the server)Testing Instructions
When you load up the widget, pass in a value for milliseconds