mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
Merge pull request #8331 from Icinga/bugfix/program-status-not-inserted-2.13
IDO: Make sure to insert program status
This commit is contained in:
commit
b98c590d9f
@ -152,7 +152,7 @@ void DbConnection::UpdateProgramStatus()
|
|||||||
DbQuery query1;
|
DbQuery query1;
|
||||||
query1.Table = "programstatus";
|
query1.Table = "programstatus";
|
||||||
query1.IdColumn = "programstatus_id";
|
query1.IdColumn = "programstatus_id";
|
||||||
query1.Type = DbQueryInsert | DbQueryUpdate;
|
query1.Type = DbQueryInsert | DbQueryDelete;
|
||||||
query1.Category = DbCatProgramStatus;
|
query1.Category = DbCatProgramStatus;
|
||||||
|
|
||||||
query1.Fields = new Dictionary({
|
query1.Fields = new Dictionary({
|
||||||
@ -179,7 +179,7 @@ void DbConnection::UpdateProgramStatus()
|
|||||||
{ "instance_id", 0 } /* DbConnection class fills in real ID */
|
{ "instance_id", 0 } /* DbConnection class fills in real ID */
|
||||||
});
|
});
|
||||||
|
|
||||||
query1.Priority = PriorityHigh;
|
query1.Priority = PriorityImmediate;
|
||||||
queries.emplace_back(std::move(query1));
|
queries.emplace_back(std::move(query1));
|
||||||
|
|
||||||
DbQuery query2;
|
DbQuery query2;
|
||||||
@ -485,7 +485,7 @@ void DbConnection::UpdateAllObjects()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (const ConfigObject::Ptr& object : dtype->GetObjects()) {
|
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 IncreasePendingQueries(int count);
|
||||||
void DecreasePendingQueries(int count);
|
void DecreasePendingQueries(int count);
|
||||||
|
|
||||||
|
WorkQueue m_QueryQueue{10000000, 1, LogNotice};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_IDCacheValid{false};
|
bool m_IDCacheValid{false};
|
||||||
std::map<std::pair<DbType::Ptr, DbReference>, String> m_ConfigHashes;
|
std::map<std::pair<DbType::Ptr, DbReference>, String> m_ConfigHashes;
|
||||||
|
@ -55,8 +55,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
DbReference m_InstanceID;
|
DbReference m_InstanceID;
|
||||||
|
|
||||||
WorkQueue m_QueryQueue{10000000, 1, LogNotice};
|
|
||||||
|
|
||||||
Library m_Library;
|
Library m_Library;
|
||||||
std::unique_ptr<MysqlInterface, MysqlInterfaceDeleter> m_Mysql;
|
std::unique_ptr<MysqlInterface, MysqlInterfaceDeleter> m_Mysql;
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
DbReference m_InstanceID;
|
DbReference m_InstanceID;
|
||||||
|
|
||||||
WorkQueue m_QueryQueue{1000000, 1, LogNotice};
|
|
||||||
|
|
||||||
Library m_Library;
|
Library m_Library;
|
||||||
std::unique_ptr<PgsqlInterface, PgsqlInterfaceDeleter> m_Pgsql;
|
std::unique_ptr<PgsqlInterface, PgsqlInterfaceDeleter> m_Pgsql;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user