handlers.heartbeat
A callback-based heartbeat handler
- class sprockets.handlers.heartbeat.HeartbeatHandler(application, request, **kwargs)¶
Heartbeat handler to determine if a service is healthy.
- get()¶
Respond with the health of our service.
- sprockets.handlers.heartbeat.register_callback(callable_)¶
Register a callable to be checked during heartbeat.
This function adds a new heartbeat callback, which can be any callable that returns True if healthy, and False if it detects a problem. Any False return value will cause a call to the HeartbeatHandler to return a 500.