Skip to content

Commit

Permalink
MON-6109: failed command because of timeout does not store message (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
garnier-quentin committed Oct 7, 2020
1 parent c10067e commit ed0cd5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gorgone/gorgone/modules/centreon/autodiscovery/class.pm
Original file line number Diff line number Diff line change
Expand Up @@ -888,12 +888,14 @@ sub action_hostdiscoveryjoblistener {
# return 1;
#}

# Can happen if we have a execution command timeout
my $message = defined($options{data}->{data}->{result}->{stdout}) ? $options{data}->{data}->{result}->{stdout} : $options{data}->{message};
if ($options{data}->{code} == GORGONE_ACTION_FINISH_KO) {
$self->{hdisco_jobs_ids}->{$job_id}->{status} = JOB_FAILED;
$self->update_job_information(
values => {
status => JOB_FAILED,
message => $options{data}->{message},
message => $message,
duration => 0,
discovered_items => 0
},
Expand Down

0 comments on commit ed0cd5b

Please sign in to comment.