Fixed a bug where DB pruning would delete pastes with no expiration date as well as pastes that had legitimately expired
This commit is contained in:
parent
aa63c16177
commit
65cb180296
|
@ -34,7 +34,7 @@ sub GetUUID {
|
|||
sub CheckExpired {
|
||||
return unless time > ($lastexpunge+900); #expunge once every 15 mins
|
||||
$lastexpunge = time;
|
||||
schema->resultset('Paste')->search({ expiration => [undef, { '<' => DateTimeToQueryable() }]})->delete_all;
|
||||
schema->resultset('Paste')->search({ expiration => { '<' => DateTimeToQueryable() }})->delete_all;
|
||||
}
|
||||
sub ValidateParams {
|
||||
my $params = shift;
|
||||
|
|
Loading…
Reference in New Issue