|
|
|
@ -160,9 +160,11 @@ sub prune {
|
|
|
|
|
|
|
|
|
|
my $now = time(); |
|
|
|
|
foreach my $time (@times) { |
|
|
|
|
my $data = Mojo::Asset::File->new(path => $self->_data_path($time)); |
|
|
|
|
my $path = $self->_data_path($time); |
|
|
|
|
my $data = Mojo::Asset::File->new(path => $path); |
|
|
|
|
my $image = $self->app->json->decode($data->slurp); |
|
|
|
|
next if $image->{expire} > $now; |
|
|
|
|
unlink $path; |
|
|
|
|
unlink $self->_image_path($time, $image->{format}, 1); |
|
|
|
|
unlink $self->_thumb_path($time); |
|
|
|
|
} 1; |
|
|
|
|