l_DowntimesCache[uid] = GetSelf();
}
- OnDowntimeAdded(GetSelf(), downtime, authority);
+ Utility::QueueAsyncCallback(bind(boost::ref(OnDowntimeAdded), GetSelf(), downtime, authority));
return uid;
}
if (!downtimes)
return;
- ObjectLock olock(owner);
-
Dictionary::Ptr downtime = downtimes->Get(id);
+ if (!downtime)
+ return;
+
String comment_id = downtime->Get("comment_id");
-
- RemoveComment(comment_id);
int legacy_id = downtime->Get("legacy_id");
l_LegacyDowntimesCache.erase(legacy_id);
l_DowntimesCache.erase(id);
}
+
+ RemoveComment(comment_id);
- OnDowntimeRemoved(owner, downtime, authority);
+ Utility::QueueAsyncCallback(bind(boost::ref(OnDowntimeRemoved), owner, downtime, authority));
}
void Service::TriggerDowntimes(void)
TriggerDowntime(tid);
}
- OnDowntimeTriggered(owner, downtime);
+ Utility::QueueAsyncCallback(bind(boost::ref(OnDowntimeTriggered), owner, downtime));
}
String Service::GetDowntimeIDFromLegacyID(int id)