Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+17
-17
@@ -37,14 +37,14 @@ HandlerNotification::~HandlerNotification()
|
||||
|
||||
bool HandlerNotification::init()
|
||||
{
|
||||
INFO_LOG() << "--- Start NotificationManagement HandlerNotification.";
|
||||
INFO_LOG(m_logger) << "--- Start NotificationManagement HandlerNotification.";
|
||||
|
||||
QVector<Database::NomAddress> dataAddressVec;
|
||||
|
||||
// read all addresses from database
|
||||
if (!m_db->select(dataAddressVec))
|
||||
{
|
||||
ERROR_LOG() << "Error reading address data from database!";
|
||||
ERROR_LOG(m_logger) << "Error reading address data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ bool HandlerNotification::init()
|
||||
// Remove old notifications
|
||||
if (isRemoveable(notif))
|
||||
{
|
||||
INFO_LOG() << "Remove old notification " << notif.title() << ", id = " << notif.id();
|
||||
INFO_LOG(m_logger) << "Remove old notification " << notif.title() << ", id = " << notif.id();
|
||||
removeNotificationIds.append(notif.id());
|
||||
return;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ bool HandlerNotification::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG() << ret();
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ bool HandlerNotification::init()
|
||||
};
|
||||
if (!m_db->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -99,11 +99,11 @@ bool HandlerNotification::init()
|
||||
m_db->removeNomNotification(notificationId);
|
||||
trans.commit();
|
||||
|
||||
DEBUG_LOG() << "m_objectNotificationMap.size() = " << m_objectNotificationMap.size();
|
||||
DEBUG_LOG(m_logger) << "m_objectNotificationMap.size() = " << m_objectNotificationMap.size();
|
||||
|
||||
if (!m_ddsHandler->fts())
|
||||
{
|
||||
ERROR_LOG() << "m_ddsHandler->fts() == nullptr!";
|
||||
ERROR_LOG(m_logger) << "m_ddsHandler->fts() == nullptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -118,8 +118,8 @@ bool HandlerNotification::init()
|
||||
connect(m_removeNotificationTimer, &QTimer::timeout, this, &HandlerNotification::onCheckRemove);
|
||||
m_removeNotificationTimer->start();
|
||||
|
||||
DEBUG_LOG() << "removeTimerInterval: " << Settings::removeTimerIntervalMSec();
|
||||
DEBUG_LOG() << "expiryTime: " << Settings::expiryIntervalMSec();
|
||||
DEBUG_LOG(m_logger) << "removeTimerInterval: " << Settings::removeTimerIntervalMSec();
|
||||
DEBUG_LOG(m_logger) << "expiryTime: " << Settings::expiryIntervalMSec();
|
||||
|
||||
return true;
|
||||
} // end of init()
|
||||
@@ -128,14 +128,14 @@ bool HandlerNotification::init()
|
||||
void HandlerNotification::onCreateNotificationRequest(const rti::core::SampleIdentity &cookie,
|
||||
const CreateNotification &request)
|
||||
{
|
||||
DEBUG_LOG() << "onCreateNotificationRequest: " << request;
|
||||
DEBUG_LOG(m_logger) << "onCreateNotificationRequest: " << request;
|
||||
|
||||
ObjectNotification *ifs(new ObjectNotification(m_ddsHandler, m_db));
|
||||
const Core::FunctionReplyObject ret = ifs->createObject(request.notification());
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
WARNING_LOG() << ret();
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_ddsHandler->fts()->createNotificationReply(cookie, ret);
|
||||
return;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ void HandlerNotification::onCreateNotificationRequest(const rti::core::SampleIde
|
||||
void HandlerNotification::onReadReceiptRequest(const rti::core::SampleIdentity &cookie,
|
||||
const ReadReceipt &request)
|
||||
{
|
||||
DEBUG_LOG() << "onReadReceiptRequest: " << request;
|
||||
DEBUG_LOG(m_logger) << "onReadReceiptRequest: " << request;
|
||||
Core::FunctionReplyObject ret;
|
||||
|
||||
for (const auto notificationId : request.notificationIds())
|
||||
@@ -170,7 +170,7 @@ void HandlerNotification::onReadReceiptRequest(const rti::core::SampleIdentity &
|
||||
|
||||
void HandlerNotification::onDeleteMessageRequest(const rti::core::SampleIdentity &cookie, const DeleteMessage &request)
|
||||
{
|
||||
DEBUG_LOG() << "onDeleteMessageRequest: " << request;
|
||||
DEBUG_LOG(m_logger) << "onDeleteMessageRequest: " << request;
|
||||
Core::FunctionReplyObject ret;
|
||||
|
||||
for (const auto notificationId : request.notificationIds())
|
||||
@@ -203,10 +203,10 @@ void HandlerNotification::onExerciseChanged(const ExerciseManagement::Exercise &
|
||||
if (obj->notification().exerciseId() != data.id())
|
||||
continue;
|
||||
|
||||
DEBUG_LOG() << "Remove notification " << obj->id();
|
||||
DEBUG_LOG(m_logger) << "Remove notification " << obj->id();
|
||||
Core::FunctionReplyObject ret = obj->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG() << ret();
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectNotification
|
||||
@@ -229,10 +229,10 @@ void HandlerNotification::onCheckRemove()
|
||||
if (!isRemoveable(notif))
|
||||
continue;
|
||||
|
||||
DEBUG_LOG() << "Remove notification " << obj->id();
|
||||
DEBUG_LOG(m_logger) << "Remove notification " << obj->id();
|
||||
Core::FunctionReplyObject ret = obj->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG() << ret();
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectNotification
|
||||
|
||||
Reference in new issue
Block a user