Closed Qwiko closed 8 months ago
I remade my implementation to use a counter-class instead that is more elegant in my opinion. If interval == 0 exporter.update will always run.
Refactored to timer instead of counter.
If it works, I'd be okay with that approach.
~Need to run black on it. Reminds me that I wanted to migrate to ruff at some point, but oh well.~
Can you run
ruff format
?
I have now run ruff format
I did a rebase to reflect all new changes to main. I don't know if I broke anything, @mweinelt please check 😊
I fixed my rebase to protect other commits.
Tested and looks like it does what it claims to do. Thanks!
Proposed solution for: #38. I am not sure if we should make interval optional or if we should remove it completely. My implementation with optional interval looks messy and could confuse users about functionality. However some users that have many prometheus pollers could have a use-case for interval-based polling instead to limit load on the service.
@mweinelt what do you think?