| 994 | } |
| 995 | |
| 996 | void ExternalCommandProcessor::DelSvcDowntime(double, const std::vector<String>& arguments) |
| 997 | { |
| 998 | int id = Convert::ToLong(arguments[0]); |
| 999 | String rid; |
| 1000 | auto dt (Downtime::GetDowntimeFromLegacyID(id)); |
| 1001 | |
| 1002 | if (dt) { |
| 1003 | rid = dt->GetName(); |
| 1004 | } |
| 1005 | |
| 1006 | try { |
| 1007 | Downtime::RemoveDowntime(rid, false, DowntimeRemovedByUser); |
| 1008 | |
| 1009 | Log(LogNotice, "ExternalCommandProcessor") |
| 1010 | << "Removed downtime ID " << arguments[0]; |
| 1011 | } catch (const invalid_downtime_removal_error& error) { |
| 1012 | Log(LogWarning, "ExternalCommandProcessor") << error.what(); |
| 1013 | } |
| 1014 | } |
| 1015 | |
| 1016 | void ExternalCommandProcessor::ScheduleHostDowntime(double, const std::vector<String>& arguments) |
| 1017 | { |