mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
parent
bd927f1bd7
commit
6f20749fb8
@ -469,15 +469,15 @@ bool ConfigItem::CommitNewItems(const ActivationContext::Ptr& context, WorkQueue
|
|||||||
if (unresolved_dep)
|
if (unresolved_dep)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int commited_items = 0;
|
int committed_items = 0;
|
||||||
upq.ParallelFor(items, [&type, &commited_items](const ItemPair& ip) {
|
upq.ParallelFor(items, [&type, &committed_items](const ItemPair& ip) {
|
||||||
const ConfigItem::Ptr& item = ip.first;
|
const ConfigItem::Ptr& item = ip.first;
|
||||||
|
|
||||||
if (item->m_Type != type)
|
if (item->m_Type != type)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip.first->Commit(ip.second);
|
ip.first->Commit(ip.second);
|
||||||
commited_items++;
|
committed_items++;
|
||||||
});
|
});
|
||||||
|
|
||||||
upq.Join();
|
upq.Join();
|
||||||
@ -485,9 +485,9 @@ bool ConfigItem::CommitNewItems(const ActivationContext::Ptr& context, WorkQueue
|
|||||||
completed_types.insert(type);
|
completed_types.insert(type);
|
||||||
|
|
||||||
#ifdef I2_DEBUG
|
#ifdef I2_DEBUG
|
||||||
if (commited_items > 0)
|
if (committed_items > 0)
|
||||||
Log(LogDebug, "configitem")
|
Log(LogDebug, "configitem")
|
||||||
<< "Committed " << commited_items << " items of type '" << type->GetName() << "'.";
|
<< "Committed " << committed_items << " items of type '" << type->GetName() << "'.";
|
||||||
#endif /* I2_DEBUG */
|
#endif /* I2_DEBUG */
|
||||||
|
|
||||||
if (upq.HasExceptions())
|
if (upq.HasExceptions())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user