wuttaweb.cleanup

Cleanup for WuttaWeb

class wuttaweb.cleanup.WuttaWebCleaner(config)[source]

This cleaner removes old Beaker session files.

cleanup(dry_run=False)[source]

This first calls get_beaker_session_dir() and then iterates over the contents, looking for files older than the cutoff (default is 30 days). Such files will be deleted unless dry_mode is specified.

get_beaker_session_dir()[source]

Retrieve the path to Beaker session storage folder.

By default this will be at venv/app/cache/sessions but it can be overridden via config.

Returns:

Path as string, or None if it could not be determined.