mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-18 18:19:13 -05:00
parent
bb3a848710
commit
c5603ba696
1 changed files with 10 additions and 0 deletions
|
|
@ -1238,8 +1238,18 @@ void ApiListener::PersistMessage(const Dictionary::Ptr& message, const ConfigObj
|
|||
|
||||
targetEndpoints.erase(GetLocalEndpoint());
|
||||
|
||||
auto now (Utility::GetTime());
|
||||
|
||||
for (auto& endpoint : targetEndpoints) {
|
||||
if (ts > endpoint->GetLocalLogPosition()) {
|
||||
{
|
||||
auto logDuration (endpoint->GetLogDuration());
|
||||
|
||||
if (logDuration >= 0u) {
|
||||
endpoint->GetReplayLog().Cleanup(now - logDuration);
|
||||
}
|
||||
}
|
||||
|
||||
endpoint->GetReplayLog().Log(ts, JsonEncode(message));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue