Application::Log(LogDebug, "checker", "Executing service check for '" + service.GetName() + "'");
- m_PendingServices.insert(service.GetName());
+ m_PendingServices.insert(service.GetConfigObject());
CheckTask::Ptr task = CheckTask::CreateTask(service);
task->Enqueue();
/* if the service isn't in the set of pending services
* it was removed and we need to ignore this check result. */
- if (m_PendingServices.find(service.GetName()) == m_PendingServices.end())
+ if (m_PendingServices.find(service.GetConfigObject()) == m_PendingServices.end())
continue;
CheckResult result = task->GetResult();
failed++;
service.SetNextCheck(now + service.GetCheckInterval());
- m_PendingServices.erase(service.GetName());
+ m_PendingServices.erase(service.GetConfigObject());
m_Services.push(service);
}
VirtualEndpoint::Ptr m_CheckerEndpoint;
ServiceQueue m_Services;
- set<string> m_PendingServices;
+ set<ConfigObject::Ptr> m_PendingServices;
Timer::Ptr m_CheckTimer;
assert(candidates.size() == 0 || !service.GetChecker().empty());
}
+ map<Endpoint::Ptr, int>::iterator hit;
+ for (hit = histogram.begin(); hit != histogram.end(); hit++) {
+ stringstream msgbuf;
+ msgbuf << "histogram: " << hit->first->GetIdentity() << " - " << hit->second;
+ Application::Log(LogInformation, "delegation", msgbuf.str());
+ }
+
if (delegated > 0) {
if (need_clear) {
map<Endpoint::Ptr, int>::iterator hit;
AssignService(endpoint, *sit);
}
-
- map<Endpoint::Ptr, int>::iterator hit;
- for (hit = histogram.begin(); hit != histogram.end(); hit++) {
- stringstream msgbuf;
- msgbuf << "histogram: " << hit->first->GetIdentity() << " - " << hit->second;
- Application::Log(LogInformation, "delegation", msgbuf.str());
- }
}
stringstream msgbuf;