Log and monitor Huey task attempts directly in your Django admin.
django-huey-log automatically captures task execution details, including status, duration, and error tracebacks, providing a searchable history of your background jobs without needing to dig through log files.
- Automated Tracking: Hooks into Huey signals to record
EXECUTING,COMPLETE,ERROR,RETRYING, andREVOKEDstates. - Detailed Visibility: Logs start/end times, duration (ms), task arguments (repr), and full exception tracebacks.
- Django Admin Integration: View, filter, and search task attempts within the Django admin interface.
- Minimal Overhead: Only records metadata; avoids large payload storage.
-
Install the package using uv:
uv add git+https://github.com/PythonUnited/django-huey-log.git
-
Add
huey_logto yourINSTALLED_APPSinsettings.py:INSTALLED_APPS = [ # ... "django_huey_log", # ... ]
-
Run migrations to create the log tables:
uv run manage.py migrate
The package works automatically once added to INSTALLED_APPS and requires django-huey to be configured in your project. It connects to the HUEY instance defined in your settings.
Once installed, navigate to the Huey Task Attempts section in your Django Admin. You can:
- Filter tasks by status (e.g., failed, retrying).
- Search by task name or task ID.
- Inspect the traceback for failed tasks to debug issues quickly.
MIT