Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
@@ -126,7 +126,7 @@ public:
|
||||
Database::AvmDeviceConfig deviceConfig = m_handler->toDeviceConfig(config);
|
||||
bool status = m_db->insert(deviceConfig);
|
||||
if (!status)
|
||||
ERROR_LOG() << "Error while inserting device config";
|
||||
ERROR_LOG(m_logger) << "Error while inserting device config";
|
||||
|
||||
m_cache.insert(config.id(), deviceConfig);
|
||||
emit m_handler->avDbReloadNeeded();
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
newDeviceConfig.id = oldDeviceConfig.id;
|
||||
bool status = m_db->update(newDeviceConfig);
|
||||
if (!status)
|
||||
ERROR_LOG() << "Error while updating device config";
|
||||
ERROR_LOG(m_logger) << "Error while updating device config";
|
||||
|
||||
m_cache[config.id()] = newDeviceConfig;
|
||||
emit m_handler->avDbReloadNeeded();
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
|
||||
bool status = m_db->removeAvmDeviceConfig(m_cache.value(configId).id);
|
||||
if (!status)
|
||||
ERROR_LOG() << "Error while removing device config";
|
||||
ERROR_LOG(m_logger) << "Error while removing device config";
|
||||
|
||||
m_cache.remove(configId);
|
||||
emit m_handler->avDbReloadNeeded();
|
||||
@@ -230,7 +230,7 @@ bool CnrHandler::init()
|
||||
|
||||
if (!m_db->select(m_channels))
|
||||
{
|
||||
ERROR_LOG() << "Error while selecting cnr channels from db";
|
||||
ERROR_LOG(m_logger) << "Error while selecting cnr channels from db";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ bool CnrHandler::init()
|
||||
QVector<AvmCnrConfig> cnrConfigs;
|
||||
if (!m_db->select(cnrConfigs))
|
||||
{
|
||||
ERROR_LOG() << "Error while selecting CNR configs from db";
|
||||
ERROR_LOG(m_logger) << "Error while selecting CNR configs from db";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ void CnrHandler::onRemoveCnrConfigRequest(const rti::core::SampleIdentity &cooki
|
||||
{
|
||||
auto ret = removeCnrConfig(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG() << ret();
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_fts->removeCnrConfigReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -284,19 +284,19 @@ void CnrHandler::onModifyCnrConfigRequest(const rti::core::SampleIdentity &cooki
|
||||
{
|
||||
auto ret = (request.id() < 1 ? createCnrConfig(request) : modifyCnrConfig(request));
|
||||
if (ret.error())
|
||||
WARNING_LOG() << ret();
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_fts->modifyCnrConfigReply(cookie, ret);
|
||||
}
|
||||
|
||||
void CnrHandler::onRadioStationAdded(int id, const QString &name, const QString &hostname)
|
||||
{
|
||||
DEBUG_LOG() << "Adding radio station with id " << id << " (" << name << ") and hostname '" << hostname << "'";
|
||||
DEBUG_LOG(m_logger) << "Adding radio station with id " << id << " (" << name << ") and hostname '" << hostname << "'";
|
||||
auto it = m_cnrRadioStations.find(id);
|
||||
if (it != m_cnrRadioStations.end() && it.value() == hostname)
|
||||
return;
|
||||
if (hostname.isEmpty())
|
||||
{
|
||||
WARNING_LOG() << "Radio station with id " << id << " (" << name << ") has an empty hostname - ignoring!";
|
||||
WARNING_LOG(m_logger) << "Radio station with id " << id << " (" << name << ") has an empty hostname - ignoring!";
|
||||
return;
|
||||
}
|
||||
m_cnrRadioStations[id] = hostname;
|
||||
@@ -305,7 +305,7 @@ void CnrHandler::onRadioStationAdded(int id, const QString &name, const QString
|
||||
|
||||
void CnrHandler::onRadioStationRemoved(int id)
|
||||
{
|
||||
DEBUG_LOG() << "Removing radio station with id " << id;
|
||||
DEBUG_LOG(m_logger) << "Removing radio station with id " << id;
|
||||
auto it = m_cnrRadioStations.find(id);
|
||||
if (it == m_cnrRadioStations.end())
|
||||
return;
|
||||
@@ -347,7 +347,7 @@ void CnrHandler::onDbDeleteAvmCnrConfig(const QVariant &id)
|
||||
if (!m_cache.contains(configId))
|
||||
return; // the notification was a result of our own removal of the entry
|
||||
|
||||
DEBUG_LOG() << "DB deleted AvmCnrConfig with id: " << configId;
|
||||
DEBUG_LOG(m_logger) << "DB deleted AvmCnrConfig with id: " << configId;
|
||||
|
||||
removeCnrConfig(Core::RemoveElementRequest(configId));
|
||||
}
|
||||
@@ -385,7 +385,7 @@ void CnrHandler::reevalutate()
|
||||
{
|
||||
auto reply = modifyCnrConfig(toRequest(cnrConfig));
|
||||
if (reply.error())
|
||||
ERROR_LOG() << reply();
|
||||
ERROR_LOG(m_logger) << reply();
|
||||
}
|
||||
|
||||
trans.commit();
|
||||
@@ -558,7 +558,7 @@ bool CnrHandler::isNameUnique(const std::string &name, const boost::optional<int
|
||||
*/
|
||||
Core::FunctionReplyObject CnrHandler::createCnrConfig(const ModifyCnrConfigRequest &request, const boost::optional<int32_t> &dbId)
|
||||
{
|
||||
DEBUG_LOG() << "CreateCnrConfigRequest: " << request;
|
||||
DEBUG_LOG(m_logger) << "CreateCnrConfigRequest: " << request;
|
||||
|
||||
auto reply = validateRequest(request);
|
||||
if (reply.error())
|
||||
@@ -586,7 +586,7 @@ Core::FunctionReplyObject CnrHandler::createCnrConfig(const ModifyCnrConfigReque
|
||||
|
||||
Core::FunctionReplyObject CnrHandler::modifyCnrConfig(const ModifyCnrConfigRequest &request)
|
||||
{
|
||||
DEBUG_LOG() << "ModifyCnrConfigRequest: " << request;
|
||||
DEBUG_LOG(m_logger) << "ModifyCnrConfigRequest: " << request;
|
||||
|
||||
auto reply = validateRequest(request);
|
||||
if (reply.error())
|
||||
@@ -630,7 +630,7 @@ Core::FunctionReplyObject CnrHandler::modifyCnrConfig(const ModifyCnrConfigReque
|
||||
|
||||
Core::FunctionReplyObject CnrHandler::removeCnrConfig(const Core::RemoveElementRequest &request)
|
||||
{
|
||||
DEBUG_LOG() << "RemoveCnrConfigRequest: " << request;
|
||||
DEBUG_LOG(m_logger) << "RemoveCnrConfigRequest: " << request;
|
||||
|
||||
int32_t configId = request.id();
|
||||
Core::FunctionReplyObject reply(configId);
|
||||
|
||||
Reference in new issue
Block a user