3 ms·
not necessarily efficient but here’s my latest use case: scheduling a health check job recursively. if the health check fails, it schedules itself to run again
by rileytg 7y ago
not necessarily efficient but here’s my latest use case:
scheduling a health check job recursively. if the health check fails, it schedules itself to run again in X seconds with N-1 runs until giving up and marking the service as down.
iteration here simply wouldn’t work
- bananasbandanas 7y agoWhy not? Just schedule a single health check with a loop that tries to health-check N times in a loop, with a delay in between. If the check succeeds at any point, return 'healthy' early. Or schedule N health checks at different times, if any check succeeds cancel all others, etc. etc.