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 Distributions
Close
Hashes for django-session-cleanup-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d563e950761ae55c0db84a2ddb00023e717e0a0da9714975e193802a8db3a7b |
|
MD5 | 9d2b51487f11fbe4affb457edb5aae17 |
|
BLAKE2b-256 | 73faed9baa277d44ff62817e6473213b1bdd1c9bbf61367792088f765ac6da07 |
Close
Hashes for django_session_cleanup-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e70aa157600ce1c1dc2e5de43a0d45692f0d773662ab26c5b059ada49811a810 |
|
MD5 | af9f6d9e3bd57efb02cfb55a117bcf96 |
|
BLAKE2b-256 | 3119e57bc01276a72e766465b1a59f38e47815b2ad2cd175ddf6afdb29ef62e3 |
Close
Hashes for django_session_cleanup-2.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 187c9252c5e1f7612d22352656109ff96d39bdf22f36eec6e8113b555fbe8b3f |
|
MD5 | 243b8270fe79d016536d8003277c6cf1 |
|
BLAKE2b-256 | 87923ebf2a4f4d3ebf1e8f14ea09c45eec8a7c11727513a394a8662920033544 |