Skip to content

Commit

Permalink
Implement CleanReportCache task
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Miller committed Aug 1, 2012
1 parent 037e6a8 commit 90a0ba6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,3 +1,3 @@
.build
.LIMS2-Tasks-*
LIMS2-Tasks-*
*~
3 changes: 3 additions & 0 deletions Changes
@@ -0,0 +1,3 @@
{{$NEXT}}

Initial release.
30 changes: 30 additions & 0 deletions lib/LIMS2/Task/General/CleanReportCache.pm
@@ -0,0 +1,30 @@
package LIMS2::Task::General::CleanReportCache;

use strict;
use warnings FATAL => 'all';

use Moose;
use LIMS2::Report;
use namespace::autoclean;

extends 'LIMS2::Task';

override abstract => sub {
'Delete stale entries from the report cache';
};

sub execute {
my ( $self, $opts, $args ) = @_;

my $verbose = $self->trace || $self->debug || $self->verbose;

LIMS2::Report::clean_cache( $self->model, $verbose );

return;
}

__PACKAGE__->meta->make_immutable;

1;

__END__

0 comments on commit 90a0ba6

Please sign in to comment.