DbObject::OnMultipleQueries(queries);
/* service dependencies */
- Log(LogDebug, "ServiceDbObject")
- << "service dependencies for '" << service->GetName() << "'";
-
queries.clear();
DbQuery query2;
DbObject::OnMultipleQueries(queries);
/* service contacts, contactgroups */
- Log(LogDebug, "ServiceDbObject")
- << "service contacts: " << service->GetName();
-
queries.clear();
DbQuery query3;
queries.emplace_back(std::move(query3));
for (const User::Ptr& user : CompatUtility::GetCheckableNotificationUsers(service)) {
- Log(LogDebug, "ServiceDbObject")
- << "service contacts: " << user->GetName();
-
DbQuery query_contact;
query_contact.Table = GetType()->GetTable() + "_contacts";
query_contact.Type = DbQueryInsert;
DbObject::OnMultipleQueries(queries);
- Log(LogDebug, "ServiceDbObject")
- << "service contactgroups: " << service->GetName();
-
queries.clear();
DbQuery query4;
queries.emplace_back(std::move(query4));
for (const UserGroup::Ptr& usergroup : CompatUtility::GetCheckableNotificationUserGroups(service)) {
- Log(LogDebug, "ServiceDbObject")
- << "service contactgroups: " << usergroup->GetName();
-
DbQuery query_contact;
query_contact.Table = GetType()->GetTable() + "_contactgroups";
query_contact.Type = DbQueryInsert;
void IdoMysqlConnection::Pause()
{
- Log(LogInformation, "IdoMysqlConnection")
- << "'" << GetName() << "' paused.";
-
m_ReconnectTimer.reset();
DbConnection::Pause();
<< "Rescheduling disconnect task.";
#endif /* I2_DEBUG */
- m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::Disconnect, this), PriorityHigh);
+ m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::Disconnect, this), PriorityLow);
m_QueryQueue.Join();
+
+ Log(LogInformation, "IdoMysqlConnection")
+ << "'" << GetName() << "' paused.";
+
}
void IdoMysqlConnection::ExceptionHandler(boost::exception_ptr exp)
<< "Scheduling reconnect task.";
#endif /* I2_DEBUG */
- m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::Reconnect, this), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::Reconnect, this), PriorityHigh);
}
void IdoMysqlConnection::Reconnect()
<< "Scheduling session table clear and finish connect task.";
#endif /* I2_DEBUG */
- m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::ClearTablesBySession, this), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::ClearTablesBySession, this), PriorityHigh);
- m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::FinishConnect, this, startTime), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::FinishConnect, this, startTime), PriorityHigh);
}
void IdoMysqlConnection::FinishConnect(double startTime)
<< "Scheduling object activation task for '" << dbobj->GetName1() << "!" << dbobj->GetName2() << "'.";
#endif /* I2_DEBUG */
- m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalActivateObject, this, dbobj), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalActivateObject, this, dbobj), PriorityHigh);
}
void IdoMysqlConnection::InternalActivateObject(const DbObject::Ptr& dbobj)
<< "Scheduling object deactivation task for '" << dbobj->GetName1() << "!" << dbobj->GetName2() << "'.";
#endif /* I2_DEBUG */
- m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalDeactivateObject, this, dbobj), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalDeactivateObject, this, dbobj), PriorityHigh);
}
void IdoMysqlConnection::InternalDeactivateObject(const DbObject::Ptr& dbobj)
void IdoPgsqlConnection::Pause()
{
- Log(LogInformation, "IdoPgsqlConnection")
- << "'" << GetName() << "' paused.";
-
m_ReconnectTimer.reset();
DbConnection::Pause();
- m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::Disconnect, this), PriorityHigh);
+ m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::Disconnect, this), PriorityLow);
m_QueryQueue.Join();
+
+ Log(LogInformation, "IdoPgsqlConnection")
+ << "'" << GetName() << "' paused.";
+
}
void IdoPgsqlConnection::ExceptionHandler(boost::exception_ptr exp)
void IdoPgsqlConnection::ReconnectTimerHandler()
{
- m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::Reconnect, this), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::Reconnect, this), PriorityHigh);
}
void IdoPgsqlConnection::Reconnect()
UpdateAllObjects();
- m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::ClearTablesBySession, this), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::ClearTablesBySession, this), PriorityHigh);
- m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::FinishConnect, this, startTime), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::FinishConnect, this, startTime), PriorityHigh);
}
void IdoPgsqlConnection::FinishConnect(double startTime)
if (IsPaused())
return;
- m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalActivateObject, this, dbobj), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalActivateObject, this, dbobj), PriorityHigh);
}
void IdoPgsqlConnection::InternalActivateObject(const DbObject::Ptr& dbobj)
if (IsPaused())
return;
- m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalDeactivateObject, this, dbobj), PriorityLow);
+ m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalDeactivateObject, this, dbobj), PriorityHigh);
}
void IdoPgsqlConnection::InternalDeactivateObject(const DbObject::Ptr& dbobj)