mirror of https://github.com/Icinga/icinga2.git
IDO: Make sure to insert program status during reconnect()
This commit is contained in:
parent
9dd197d0af
commit
03af068302
|
@ -152,7 +152,7 @@ void DbConnection::UpdateProgramStatus()
|
|||
DbQuery query1;
|
||||
query1.Table = "programstatus";
|
||||
query1.IdColumn = "programstatus_id";
|
||||
query1.Type = DbQueryInsert | DbQueryUpdate;
|
||||
query1.Type = DbQueryInsert | DbQueryDelete;
|
||||
query1.Category = DbCatProgramStatus;
|
||||
|
||||
query1.Fields = new Dictionary({
|
||||
|
@ -179,7 +179,7 @@ void DbConnection::UpdateProgramStatus()
|
|||
{ "instance_id", 0 } /* DbConnection class fills in real ID */
|
||||
});
|
||||
|
||||
query1.Priority = PriorityHigh;
|
||||
query1.Priority = PriorityImmediate;
|
||||
queries.emplace_back(std::move(query1));
|
||||
|
||||
DbQuery query2;
|
||||
|
@ -485,7 +485,7 @@ void DbConnection::UpdateAllObjects()
|
|||
continue;
|
||||
|
||||
for (const ConfigObject::Ptr& object : dtype->GetObjects()) {
|
||||
UpdateObject(object);
|
||||
m_QueryQueue.Enqueue([this, object](){ UpdateObject(object); }, PriorityHigh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,8 @@ protected:
|
|||
void IncreasePendingQueries(int count);
|
||||
void DecreasePendingQueries(int count);
|
||||
|
||||
WorkQueue m_QueryQueue{10000000, 1, LogNotice};
|
||||
|
||||
private:
|
||||
bool m_IDCacheValid{false};
|
||||
std::map<std::pair<DbType::Ptr, DbReference>, String> m_ConfigHashes;
|
||||
|
|
|
@ -55,8 +55,6 @@ protected:
|
|||
private:
|
||||
DbReference m_InstanceID;
|
||||
|
||||
WorkQueue m_QueryQueue{10000000, 1, LogNotice};
|
||||
|
||||
Library m_Library;
|
||||
std::unique_ptr<MysqlInterface, MysqlInterfaceDeleter> m_Mysql;
|
||||
|
||||
|
|
|
@ -48,8 +48,6 @@ protected:
|
|||
private:
|
||||
DbReference m_InstanceID;
|
||||
|
||||
WorkQueue m_QueryQueue{1000000, 1, LogNotice};
|
||||
|
||||
Library m_Library;
|
||||
std::unique_ptr<PgsqlInterface, PgsqlInterfaceDeleter> m_Pgsql;
|
||||
|
||||
|
|
Loading…
Reference in New Issue