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-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dac3cc04710401ed014607b0399d04468e5644f8a78644d957838281dbd9a25 |
|
MD5 | f89b3df526c3d86a46bb4313ff22becf |
|
BLAKE2b-256 | 6ce5ef8477b9622f0646d78b55cdfa2a4be2d3ce4a3934a310d04358d4953af5 |
Close
Hashes for django_session_cleanup-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e97ca712ec1e1476fba5ded79bb4be8d733d5bf34cf144135875b104ec03ca6 |
|
MD5 | b141a6bce5c7ac2404bebac2186868e5 |
|
BLAKE2b-256 | 2186221c810e5387b06e63bd939f0a58f0930f417c085360566819b2b4a40195 |