-
Notifications
You must be signed in to change notification settings - Fork 1k
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
History beta poll decay time reset #11178
Conversation
cd2e65f
to
75333ee
Compare
Thanks man, I'll beat on it some more. Was trying to have a global solution that didn't involve us touching every outgoing ajax POST. |
@Nerdinacan No worries at all -- I really like the approach, and the watching is all working great. We just need to get the restoration to $freshPoll or otherwise resetting decay working right. |
75333ee
to
0b09b79
Compare
Yep got it. I think it was just misconfigured. I left a debug line in decay() so you can see it reset in the console. On a side note I really wish there was a way to make prettier understand piped functions. I hate having to add prettier-ignore because prettier legitimately finds a lot of dumb formatting bugs. But it leaves every observable stream unintelligible. |
@Nerdinacan I'll see what I can figure out. Agree it'd be great to just let prettier process these files (and notice issues), but putting all the piped stuff in a single line does indeed suck. |
Dropped a couple prettier-ignores that weren't doing much, but we can/should certainly continue to use this where the formatting is egregious.
@Nerdinacan Thanks. This is working great now; I pushed a commit with minor cleanup and a typo fix but no functional changes. I some digging into making prettier work better with RxJS in general, and it's an issue folks are aware of there. There have been a few attempts at it, and maybe they'll get it right at some point, but for now I'd just say scope (for what it's worth, part of the problem here is actually our wide 120 character code width -- most of the rxjs is actually pretty decent to read when wrapped to 80) |
The beta history poll slows down over time so we're not asking the server for useless things during periods of inactivity, but it makes sense to speed up whenever we start manipulating content.
I've modified how the polling works to include an observable that looks at the browser XHR object and emits an event when a matching method / url are detected, this emission is used to reset the decay time on the polling.