-
Notifications
You must be signed in to change notification settings - Fork 108
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 synchronous jobs #10
Conversation
@dominikschulz what do you think about the feature in general and my patch? Update: I rebased all commits to only have one and removed the debug output by using NewNopLogger(). I hope the PR is much easier to review now. |
d32bdb5
to
643bea6
Compare
Sorry for the long delay. I was thinking about this PR a few times already, but I don't really like the current approach. It feels to hacky, adding too many special cases. We understand the need for synchronous queries, but I'd like to find a way that feels more natural. |
I'd really love to see synchronous queries. Async queries can easily misalign with scraping intervals and cause steady rates to appear as sawtooth. |
@dominikschulz I would really appreciate if you can find a more clean way to do this. For someone who is a more experienced developer and knows the involved libraries it might just be a few lines of code. There is not much logic involved. What do you think about the way to identify a synchronous job by setting the interval to '0' ? @bobrik that was our problem and the intention to add that feature! |
I just pushed a rebased and polished up version of this patch to the original location. (Sorry for deleting it some time ago.) It now also updates the README file to mention interval 0. |
Fixes justwatchcom#19 Signed-off-by: Dominik Schulz <[email protected]>
- athena driver-based queries may break late (ie, not during connect)
they do not conform to the RFCs for web URLs, and Go 1.12.8+ enforce this. Instead of the parsed URL, keep the original connection string. This could probably be generalized for other databases, but I don't know if they have the same problem. Signed-off-by: Matthias Rampke <[email protected]>
Signed-off-by: Matthias Rampke <[email protected]>
Fwiw, #51 is about snowflake support, not synchronous jobs, so this PR should have been left open. |
Thanks, I'll take a look what went wrong there :\ |
@dewey Well, looks like this PR is still marked merged while in fact it has not been merged yet? |
I have re-submitted this as #131 now as untangling this one looks difficult. |
Thank you, much appreciated! I had a hard time to figure out how to undo that. |
We needed a possibility to execute some jobs / queries synchronous every time /metrics is requested.
So I added the infrastructure to execute jobs with an interval <=0 synchronous when the http-handler is called.
I hope my patch does not brings any drawback, just had to change some parts after importing your current version.
It would be great if you are interested in this feature and we could start a discussion.