Merge pull request #7760 from Icinga/bugfix/icingadb-manually-rescheduling-a-check-does-not-update-next_update-and-next_check-7707

IcingaDB: Fix rescheduling a check not always updating state in Redis
This commit is contained in:
Alexander Aleksandrovič Klimov 2020-01-16 11:58:28 +01:00 committed by GitHub
commit f11cccf874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -2056,6 +2056,7 @@ void IcingaDB::NewCheckResultHandler(const Checkable::Ptr& checkable)
void IcingaDB::NextCheckChangedHandler(const Checkable::Ptr& checkable)
{
for (auto& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
rw->m_WorkQueue.Enqueue([rw, checkable]() { rw->UpdateState(checkable); });
rw->m_WorkQueue.Enqueue([rw, checkable]() { rw->SendNextUpdate(checkable); });
}
}