mirror of
https://github.com/schoebel/mars
synced 2025-01-14 02:50:48 +00:00
marsadm: cleanup outdated messages
This commit is contained in:
parent
e297acde10
commit
978d3de51b
@ -2391,6 +2391,12 @@ sub logdelete_res {
|
||||
lprint " unlink '$leftlink'\n" if $verbose;
|
||||
unlink($leftlink);
|
||||
}
|
||||
foreach my $leftlink (glob("$mars/{,resource-$res/}actual-*/msg-*")) {
|
||||
my $stamp = get_link_stamp($leftlink);
|
||||
next unless $stamp + 3600 * 4 < $start_time;
|
||||
lprint " unlink '$leftlink'\n" if $verbose;
|
||||
unlink($leftlink);
|
||||
}
|
||||
my @paths = glob("$mars/resource-$res/log-*") or ldie "cannot find any logfiles\n";
|
||||
@paths = sort(@paths);
|
||||
my ($min_deletable, $max_deletable) = _get_deletable_logfiles(@_);
|
||||
|
Loading…
Reference in New Issue
Block a user