mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-21 02:00:45 +08:00
Catch lost cleanup task (should rarely happen).
This commit is contained in:
@@ -49,8 +49,13 @@ sub new {
|
|||||||
sub DESTROY {
|
sub DESTROY {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
my $task = $self->{task};
|
my $task = $self->{task};
|
||||||
|
if ( ref $task ) {
|
||||||
PTDEBUG && _d('Calling cleanup task', $task);
|
PTDEBUG && _d('Calling cleanup task', $task);
|
||||||
$task->();
|
$task->();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
warn "Lost cleanup task";
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user