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
General usage
$ <environment>/bin/paster call beaker.scripts:cleanup path/to/config.cfg 4h bkr.session
beaker.scripts: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 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 <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
Built Distribution
File details
Details for the file BeakerCleanup-0.1.zip
.
File metadata
- Download URL: BeakerCleanup-0.1.zip
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9f0e2fe1769e139e3e592381852b99a3ed633839d59f5b7e773c53df90557fa |
|
MD5 | edbdcf92096e4184c1094c3d56202e5e |
|
BLAKE2b-256 | 955aac43133960c76b28da1a2b058790db1b17ca559837d7a9453fce6163297b |
File details
Details for the file BeakerCleanup-0.1.tar.gz
.
File metadata
- Download URL: BeakerCleanup-0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b23abd80e9fd2051b7ff129b43ea65a40c46765e6573ed035923ec34d86476b |
|
MD5 | 2e4dace48e1ce81873dc631d52d00b47 |
|
BLAKE2b-256 | 545db807b32d461b77013dac559442bce0dc45a6817172fcd8410ce07faa87d2 |
File details
Details for the file BeakerCleanup-0.1-py2.5.egg
.
File metadata
- Download URL: BeakerCleanup-0.1-py2.5.egg
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f4036c92e329f4d7b27999b5edc236631b870f45dcf3a1d0fe3092b03185205 |
|
MD5 | 28ee64bae5e0cd4ff6cb603b155da9e4 |
|
BLAKE2b-256 | 2ab1fd6053aec27e2838dcd79eeeb2f0d91e07e96360361d8b955b2821400113 |