Closed xxorde closed 2 years ago
@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.
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. Could you maybe have another look to see if it fits your idea, or what would need changing? We are running this patch in https://github.com/credativ/elephant-shed and would love to see it merged. Thanks!
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.