A callback-based heartbeat handler
Installation
sprockets.handlers.heartbeat is available on the Python Package Index and can be installed via pip or easy_install:
pip install sprockets.handlers.heartbeat
Documentation
Requirements
Example
This examples demonstrates how to use sprockets.handlers.heartbeat by registering the check_database method that is invoked each time a request to /heartbeat is made.
from sprockets.handlers import heartbeat
from tornado import web
def check_database():
"""Any check method should return a bool specifying the check is ok.
:rtype: bool
"""
return True
# Register the check method
heartbeat.register_callback(check_database)
# Create a Tornado application
app = web.Application([('/heartbeat', heartbeat.HeartbeatHandler)])
Version History
Available at https://sprocketshandlersheartbeat.readthedocs.org/en/latest/history.html
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sprockets.handlers.heartbeat-0.1.0.tar.gz.
File metadata
- Download URL: sprockets.handlers.heartbeat-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7212ec76648729f4fc055910be72888e6da317975f7994c78b7ab1c2eab1395
|
|
| MD5 |
33efc6a5c7d62981dd3a976ca85bcd49
|
|
| BLAKE2b-256 |
626598b3770441d720b408be0209c4018580203c11502aead5428c2fc62a93ac
|