Skip to main content

A simple Django app to let you know if huey tasks are working without errors.

Project description

A simple Django app to let you know if huey tasks are working without errors.

Installation

pip install django-huey-logger

Requirements

Needs huey installed and configured.

Usage

In your settings.py

INSTALLED_APPS = [
    'huey_logger',
    # Django modules
    ...
]

Run migrations

python manage.py migrate huey_logger

Using the decorators

Keep track of your periodic tasks by adding a decorator to your functions

from huey_logger.decorators import log_db_periodic_task, log_db_task
from huey import crontab


@log_db_periodic_task(crontab(hour='*/1', minute=0))
def periodic_do_something():
    print("I'm saying hello every hour :)")

@log_db_task
def do_something_in_background():
    print("I'm saying hello under the hood")

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

django-huey-logger-1.0.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

django_huey_logger-1.0.0-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

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