Skip to content

Commit

Permalink
feature: quickly end maintenance on missing folder
Browse files Browse the repository at this point in the history
No need to run Maintenance task for Deploy if related datastore folder doesn't exist
  • Loading branch information
g-bougard committed Sep 14, 2018
1 parent ef8f9ae commit 3243caf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/FusionInventory/Agent/Task/Deploy/Maintenance.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ sub new {
sub doMaintenance {
my ($self) = @_;

my $folder = $self->{target}->getStorage()->getDirectory();
my $folder = $self->{target}->getStorage()->getDirectory()
or return;

$folder .= '/deploy';
return unless -d $folder;

my $datastore = FusionInventory::Agent::Task::Deploy::Datastore->new(
config => $self->{config},
path => $folder.'/deploy',
path => $folder,
logger => $self->{logger}
);

Expand Down

0 comments on commit 3243caf

Please sign in to comment.