Skip to main content

A callback-based heartbeat handler

Project description

A callback-based heartbeat handler

Version Downloads Status Coverage License

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

https://sprocketshandlersheartbeat.readthedocs.org

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sprockets.handlers.heartbeat-0.1.0.tar.gz (5.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page