-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 timeout option while running queries over HTTP #3238
Conversation
Can you make the timeout accept a duration instead of just milliseconds? i.e., |
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.
The test failure you mentioned didn't happen in CI.
Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @codexnull, @paulftw, and @srfrog)
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.
Can you make the timeout accept a duration instead of just milliseconds? i.e., ?timeout=1s or ?timeout=1m for 1 second or 1 minute.
Any ideas of a standards and a parser around this? time package does this?
The test failure you mentioned didn't happen in CI.
May be it happens when you run it twice. Was able to reproduce it on desktop.
Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @codexnull, @paulftw, and @srfrog)
https://golang.org/pkg/time/#ParseDuration should work. |
I find |
19c675f
to
862e016
Compare
The endpoint /query now accepts a timeout key /query?timeout=100ms If the query doesn't finish within the timeout time, query is stopped and an error is returned.
862e016
to
af9a8b9
Compare
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.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @codexnull, @paulftw, and @srfrog)
The endpoint /query now accepts a timeout key - /query?timeout=100ms.
This change is