Skip to main content

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

  1. Run pip install django-session-cleanup.

  2. Add session_cleanup to INSTALLED_APPS in your project’s settings.

  3. 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

django-session-cleanup-2.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distributions

django_session_cleanup-2.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

django_session_cleanup-2.0.0-py2-none-any.whl (3.7 kB view details)

Uploaded Python 2

File details

Details for the file django-session-cleanup-2.0.0.tar.gz.

File metadata

  • Download URL: django-session-cleanup-2.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5

File hashes

Hashes for django-session-cleanup-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2d563e950761ae55c0db84a2ddb00023e717e0a0da9714975e193802a8db3a7b
MD5 9d2b51487f11fbe4affb457edb5aae17
BLAKE2b-256 73faed9baa277d44ff62817e6473213b1bdd1c9bbf61367792088f765ac6da07

See more details on using hashes here.

File details

Details for the file django_session_cleanup-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: django_session_cleanup-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5

File hashes

Hashes for django_session_cleanup-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e70aa157600ce1c1dc2e5de43a0d45692f0d773662ab26c5b059ada49811a810
MD5 af9f6d9e3bd57efb02cfb55a117bcf96
BLAKE2b-256 3119e57bc01276a72e766465b1a59f38e47815b2ad2cd175ddf6afdb29ef62e3

See more details on using hashes here.

File details

Details for the file django_session_cleanup-2.0.0-py2-none-any.whl.

File metadata

  • Download URL: django_session_cleanup-2.0.0-py2-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5

File hashes

Hashes for django_session_cleanup-2.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 187c9252c5e1f7612d22352656109ff96d39bdf22f36eec6e8113b555fbe8b3f
MD5 243b8270fe79d016536d8003277c6cf1
BLAKE2b-256 87923ebf2a4f4d3ebf1e8f14ea09c45eec8a7c11727513a394a8662920033544

See more details on using hashes here.

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