Maplat::Worker::DirCleaner - Clean stale files from directories
This module cleans out old/stale files from configured directories
This module provides a simple directory cleaner for multiple directories. Currently, no recursive cleaning is done (we're working on that, stay tuned). Just configure the module, the actual cleaning is done automatically.
<module> <modname>dircleaner</modname> <pm>DirCleaner</pm> <options> <reporting>reporting</reporting> <memcache>memcache</memcache> <db>maindb</db> <limit>1000</limit> <directory> <path>/full/path/to/dir</path> <maxage>8</maxage> </directory> ... <directory> <path>relative/path/to/dir</path> <maxage>7</maxage> </directory> </options> </module>
maxage is the maximum age in days the files are allowed to reside in the directory
limit denotes the limit of how many files to clean out in a single run. This option prevents the module of monopolizing harddisk IO.
Internal function.
This module depends on the following modules beeing configured (the 'as "somename"' means the key name in this modules configuration):
Maplat::Worker::PostgresDB as "db" Maplat::Worker::Memcache as "memcache" Maplat::Worker::Reporting as "reporting"
Maplat::Worker
Rene Schickbauer, <rene.schickbauer@gmail.com>
Copyright (C) 2008-2011 by Rene Schickbauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install Maplat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Maplat
CPAN shell
perl -MCPAN -e shell install Maplat
For more information on module installation, please visit the detailed CPAN module installation guide.