Skip to main content

Ping to MySQL in Django middleware.

Project description

build-status pypi docs

Ping to MySQL in Django middleware.

This middleware ping to MySQL server before the request and auto reconnect to the server.

It supports PyMySQL(using MySQLdb mode) and mysqlclient in the database backend of Django(django.db.backends.mysql).

Usage

  1. Add to settings.INSTALLED_APPS
INSTALLED_APPS = [
    ...
    'mysqlping',
]
  1. Add to settings.MIDDLEWARE (For example, you want to ping before every processes, therefore insert the middleware to first.)
MIDDLEWARE = [
    'mysqlping.middleware.MySQLPingMiddleware',
    ...
]

License

This software is licensed under the MIT License.

Author

  • Shinya Okano

Project details


Download files

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

Files for django-mysqlping, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_mysqlping-0.1.1-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page