-
Notifications
You must be signed in to change notification settings - Fork 144
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
Abort query request #365
Comments
@pavelvlasov thanks for submitting this question, and apologies for the late reply. Would you mind expanding on this a bit? In which circumstances would need to abort a request? Just curious- |
@dustinlarimer sorry for a late response. We have chart with several lines and timeframe selector. I just want to abort query requests if user need another timeframe, or timeframe was selected by mistake. Because sometimes queries take a lot of time and it doesn't make sense to wait, if another interval was selected. |
@pavelvlasov thanks for the reply! Copying my response from this comment, perhaps this will work for you as well? #370 (comment) The request object that var req = client.run(query);
// Subscribe
req.on('complete', handleResponse);
// Unsubscribe
req.off('complete'); Do you think that might do the trick? This won't abort the XHR request, but may prevent the error that's holding you up. Also, give keen-analysis.js a look. This is a new SDK currently being developed, but is stable enough to use. It runs on the Bluebird promise library, making use of the |
thanks @dustinlarimer! keen-analysis looks like a good option. Solution from your comment won't work for me, because I need to abort XHR. We're performing 3-4 concurrent requests to keen for each chart, so it can slow down the UI a lot. Aren't you going to add abort feature soon? Because we're widely using keen-js in our project and migrating to keen-analysis will take a lot of time. |
@pavelvlasov totally understand that concern. If we can get this PR updated to use the |
Is there any way to abort request after
keenClient.run(...)
?The text was updated successfully, but these errors were encountered: