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