| 2292 | } |
| 2293 | |
| 2294 | void ExternalCommandProcessor::DisableServicegroupSvcNotifications(double, const std::vector<String>& arguments) |
| 2295 | { |
| 2296 | ServiceGroup::Ptr sg = ServiceGroup::GetByName(arguments[0]); |
| 2297 | |
| 2298 | if (!sg) |
| 2299 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service notifications for non-existent servicegroup '" + arguments[0] + "'")); |
| 2300 | |
| 2301 | for (const Service::Ptr& service : sg->GetMembers()) { |
| 2302 | Log(LogNotice, "ExternalCommandProcessor") |
| 2303 | << "Disabling notifications for service '" << service->GetName() << "'"; |
| 2304 | |
| 2305 | service->ModifyAttribute("enable_notifications", false); |
| 2306 | } |
| 2307 | } |
| 2308 | |
| 2309 | std::mutex& ExternalCommandProcessor::GetMutex() |
| 2310 | { |
nothing calls this directly
no test coverage detected