Skip to main content

A beaker plugin that implements a function to be called from the command line via PasteCall.

Project description

This is a beaker plugin which exposes a cleanup function. The cleanup function cleans the old session data created by beaker database backend.

It uses a PasterCall plugin to expose the cleanup to the console.

Mercurial repository: bitbucket.org.

Installation

easy_install:

$ <env>/bin/easy_install BeakerCleanup

pip:

$ <env>/bin/pip install BeakerCleanup

Upgrading from a previous version

Note that in 0.1.2 the location of the cleanup function changed from beaker.scripts:cleanup to beaker.scripts.cleanup:cleanup due to namespace issues.

General usage

$ <environment>/bin/paster call beaker.scripts.cleanup:cleanup path/to/config.cfg 4h bkr.session

beaker.scripts.cleanup:cleanup is an entry point to the cleanup function

path/to/config.cfg is a path to the WSGI config file containing beaker session parameters (usually .cfg or .ini)

4h tells to clean up sessions which are older than (has accessed before) 4 hours. You can give

  • 1m, 18m, 76m, etc - minutes

  • 1h, 4h, 25h, etc - hours

  • 1d, 2d, 32d, etc - days

bkr.session (optional, default: 'beaker.session') is a prefix which is needed to find the beaker session parameters in the config file. It allows you to choose which backend to clean up when you have more than one. E.g.:

bkr.session.url = sqlite:///my.db
bkr.session.table_name = sessions

Usage examples

If you are mostly using defaults your call could be similar to this:

$ paster call beaker.scripts.cleanup:cleanup my/config.ini 5h

If you are using a virtual environment <env> you’ll call it like this

$ <env>/bin/paster call beaker.scripts.cleanup:cleanup <env>/prod.ini 3d

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

BeakerCleanup-0.1.2.zip (6.9 kB view details)

Uploaded Source

BeakerCleanup-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distributions

BeakerCleanup-0.1.2-py2.6.egg (5.1 kB view details)

Uploaded Source

BeakerCleanup-0.1.2-py2.5.egg (8.1 kB view details)

Uploaded Source

File details

Details for the file BeakerCleanup-0.1.2.zip.

File metadata

  • Download URL: BeakerCleanup-0.1.2.zip
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for BeakerCleanup-0.1.2.zip
Algorithm Hash digest
SHA256 0dd5ca6ef7238c5f373e7bba3e6cf445ddb981a001312651e85788bbc45ee2a7
MD5 565203239afc6e1b68ec192632ea3ab1
BLAKE2b-256 5f2541037f8cca7b92a19ca283b0a4877acde841faf366174dbbb944d9e3ed31

See more details on using hashes here.

File details

Details for the file BeakerCleanup-0.1.2.tar.gz.

File metadata

File hashes

Hashes for BeakerCleanup-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ca428f134fca6bc09fe5485d7a10ccfbe320f268b4fc6a23e294b310e0c2ee98
MD5 37d187890b78edd7cd70e00425f38e33
BLAKE2b-256 9259d48f25096b66b2746a0fe701729a46bd8186795bdb6c0011c40996589ca1

See more details on using hashes here.

File details

Details for the file BeakerCleanup-0.1.2-py2.6.egg.

File metadata

File hashes

Hashes for BeakerCleanup-0.1.2-py2.6.egg
Algorithm Hash digest
SHA256 df5a2a1ef982f8a0f3d3b016d21a02d6844e1a21e93d5c590d5fa6bf6b6d7df0
MD5 22227af288cffc0b48378b487e7fcb09
BLAKE2b-256 b560341f10b44ab8fc8b677a32119f3dcc567fe8094d096051f9ce1b1bfeedc5

See more details on using hashes here.

File details

Details for the file BeakerCleanup-0.1.2-py2.5.egg.

File metadata

File hashes

Hashes for BeakerCleanup-0.1.2-py2.5.egg
Algorithm Hash digest
SHA256 47fb6dc6fdb23383821c7ee9546d7219a0a1e8daf3f571bfeb7947e9eb1dbe3a
MD5 0027f231dde229949b69c3c4892e9968
BLAKE2b-256 d21be9f1a592b66518beeb7fe16992d282e75f2f7d2a69842783e806d2931294

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