fixed fixed error on stop_downtime
This commit is contained in:
parent
16912732d2
commit
329cafad49
|
@ -4818,6 +4818,25 @@ sub cli_stop_downtime () {
|
|||
my $current_time = time;
|
||||
my $downtime_date_to = get_db_value ($dbh, 'SELECT date_to FROM tplanned_downtime WHERE id=?', $downtime_id);
|
||||
|
||||
my $type_execution = get_db_value ($dbh, 'SELECT type_execution FROM tplanned_downtime WHERE id=?', $downtime_id);
|
||||
|
||||
if($type_execution eq 'periodically'){
|
||||
|
||||
my $downtime_running = get_db_value ($dbh, 'SELECT executed FROM tplanned_downtime WHERE id=?', $downtime_id);
|
||||
if($downtime_running == 1){
|
||||
print_log "[INFO] Planned_downtime '$downtime_name' can't be stopped\n\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($current_time >= $downtime_date_to) {
|
||||
print_log "[INFO] Planned_downtime '$downtime_name' is already stopped\n\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if($current_time >= $downtime_date_to) {
|
||||
print_log "[INFO] Planned_downtime '$downtime_name' is already stopped\n\n";
|
||||
exit;
|
||||
|
|
Loading…
Reference in New Issue