A periodic task for removing expired Django sessions with Celery.
Project description
For projects that use the cached_db or db session engines, the django_session table can get quite large after a while.
Django provides the ‘cleanup’ management command for deleting expired sessions from this table but you have to either run this command manually or set-up a cron job.
Django Session Cleanup provides a periodic task for Celery that will delete expired sessions.
Usage
Run pip install django-session-cleanup.
Add session_cleanup to INSTALLED_APPS in your project’s settings.
Edit or create CELERYBEAT_SCHEDULE in your project’s settings:
from session_cleanup.settings import weekly_schedule CELERYBEAT_SCHEDULE = { ... 'session_cleanup': weekly_schedule }
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
Built Distribution
Close
Hashes for django-session-cleanup-3.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 941db9d9c8433a0dc11562c11ca253ea977e050b1c681f899ab48df203df62c6 |
|
MD5 | d729eb2d50426219f529d8a3fd7e5ebc |
|
BLAKE2b-256 | f907ed3bc00b2eadd183cb4c7f04a80afd897a5078c6fb1e8ec660de82a01824 |
Close
Hashes for django_session_cleanup-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c7c7f04503049e270797983e342f5db8f8a28963da44cb309a721acb7aa2b56 |
|
MD5 | dd7ee6be923ee26f3093b2959aa77e0b |
|
BLAKE2b-256 | 087f55abe9dfb73b1f02e6365e8cd82ea0529cc7ea3832ab332acf1197f782a4 |