-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
add live-list poller #2790
add live-list poller #2790
Conversation
@dvoytenko PTAL |
return; | ||
} | ||
if (this.lastBackoffTimeoutId_) { | ||
this.win.clearTimeout(this.lastBackoffTimeoutId_); |
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.
Add this.lastBackoffTimeoutId_ = null;
after clearing 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.
done. also added tests
e260328
to
ced61e0
Compare
@dvoytenko PTAL, ready for review again. |
* The poller is running but is doing exponential backoff (using | ||
* the original interval value as base) every tick. | ||
*/ | ||
BACKEDOFF: 'backedoff', |
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.
Not sure how useful this state is. From a point of view of the poller itself: it can be either running or not running, right? And it can be either in normal mode or recovery mode. But it depends on how you intend the PollerState enum to be used - if it's mostly for internal/testing purposes, it's certainly fine.
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.
removed.
953a250
to
3c4c2ea
Compare
5b75245
to
9dee506
Compare
@dvoytenko PTAL. ready for review again |
* Polling state of a Poller instance. | ||
* @enum {string} | ||
*/ | ||
export const PollerState = { |
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.
This looks like a binary state now - so a simple boolean would do :)
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.
👍 done.
@erwinmombay Looks great. Just a few requests, but pretty close to LGTM. |
@dvoytenko addressed last rounds of comments. PTAL |
LGTM |
@dvoytenko poller review here