andrewthetechie / py-healthchecks.io

A python client for healthchecks.io. Supports the management api and ping api
MIT License
6 stars 2 forks source link

Retrying pings and ignoring failed pings #746

Open rudolfbyker opened 1 month ago

rudolfbyker commented 1 month ago

At first I wrote my own simple client for healthchecks.io with just the minimal features that I need, but then I thought, someone must have done this already, so I searched and found your project. It's very clean and easy to understand, so well done.

Is your feature request related to a problem? Please describe.

My client does two things which I'm missing in yours, which is preventing me from throwing away mine and just using yours:

Describe the solution you'd like

There are a few possible options:

Describe alternatives you've considered

Additional context

N/A

andrewthetechie commented 1 month ago

Hi @rudolfbyker, thank you for the issue.

At this point, this library is in maintenance mode. I am not actively using healthchecks.io anymore in my workflow, so I am no longer using their API daily. I will review PRs if you are interested in contributing.

I am not a big fan of adding retries to the library itself. I would leave that to the user. Could you wrap calls to success_ping or fail_ping in a retry wrapper in your code? They both raise unique exceptions you could use to control the retry behavior. You could also catch the exceptions in your script for when your internet is down and not fail there.

I think the pluggable backend is the best route to go if you want to contribute.