Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+18
-18
@@ -48,7 +48,7 @@ bool FlmHandler::init(MainDispatcher *mainDispatcher)
|
||||
|
||||
bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungsnummer, const QJsonObject &obj)
|
||||
{
|
||||
ERROR_LOG() << "exerciseId: " << m_exerciseId << ", partyId: " << partyId
|
||||
ERROR_LOG(m_logger) << "exerciseId: " << m_exerciseId << ", partyId: " << partyId
|
||||
<< ", name: " << name
|
||||
<< ", meldungsnummer: " << meldungsnummer;
|
||||
|
||||
@@ -58,11 +58,11 @@ bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungs
|
||||
const QString folderName = QStringLiteral("Messages");
|
||||
int folderHXMessagesId = m_dtcFlm->findFolder(partyFolderId, folderName);
|
||||
|
||||
ERROR_LOG() << "folderHXMessagesId: " << folderHXMessagesId;
|
||||
ERROR_LOG(m_logger) << "folderHXMessagesId: " << folderHXMessagesId;
|
||||
|
||||
if (folderHXMessagesId <= 0)
|
||||
{
|
||||
ERROR_LOG() << "Folder Messages does not exist for exerciseId: " << m_exerciseId << ", partyId: " << partyId;
|
||||
ERROR_LOG(m_logger) << "Folder Messages does not exist for exerciseId: " << m_exerciseId << ", partyId: " << partyId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungs
|
||||
fileContentReq.exerciseId(m_exerciseId);
|
||||
fileContentReq.operatorId(99);
|
||||
|
||||
DEBUG_LOG() << "HQ: name: " << fileContentReq.name() << ", folderId: " << folderHXMessagesId << ", exerciseId: " << m_exerciseId << ", partyId: " << partyId;
|
||||
DEBUG_LOG(m_logger) << "HQ: name: " << fileContentReq.name() << ", folderId: " << folderHXMessagesId << ", exerciseId: " << m_exerciseId << ", partyId: " << partyId;
|
||||
|
||||
|
||||
QRegularExpression re(QStringLiteral("_\\d+$"));
|
||||
@@ -93,12 +93,12 @@ bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungs
|
||||
|
||||
|
||||
baseName = baseName.normalized(QString::NormalizationForm_C);
|
||||
ERROR_LOG() << "BaseName: " << baseName << "|";
|
||||
ERROR_LOG(m_logger) << "BaseName: " << baseName << "|";
|
||||
|
||||
QStringList fileNames;
|
||||
if (!m_dtcFlm->getAllFiles(fileContentReq.fileType(), folderHXMessagesId, fileNames, true))
|
||||
{
|
||||
ERROR_LOG() << "Error while reading fileNames for folderId: " << folderHXMessagesId;
|
||||
ERROR_LOG(m_logger) << "Error while reading fileNames for folderId: " << folderHXMessagesId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -106,13 +106,13 @@ bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungs
|
||||
for (const QString &fileName : std::as_const(fileNames))
|
||||
{
|
||||
QString normalizedName = fileName.normalized(QString::NormalizationForm_C);
|
||||
DEBUG_LOG() << "normalized fileName: " << normalizedName << "|";
|
||||
DEBUG_LOG(m_logger) << "normalized fileName: " << normalizedName << "|";
|
||||
|
||||
if (!normalizedName.startsWith(baseName))
|
||||
continue;
|
||||
|
||||
QString rest = fileName.mid(baseName.length());
|
||||
DEBUG_LOG() << "rest: " << rest;
|
||||
DEBUG_LOG(m_logger) << "rest: " << rest;
|
||||
if (rest.contains(QStringLiteral(".")))
|
||||
rest = rest.section(QStringLiteral("."), 0, 0);
|
||||
|
||||
@@ -128,12 +128,12 @@ bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungs
|
||||
if (ok)
|
||||
maxNumber = std::max(maxNumber, currentNum);
|
||||
}
|
||||
DEBUG_LOG() << " maxNumber: " << maxNumber;
|
||||
DEBUG_LOG(m_logger) << " maxNumber: " << maxNumber;
|
||||
}
|
||||
|
||||
const QString newName = baseName
|
||||
+ QStringLiteral("_") + QString::number(++maxNumber);
|
||||
DEBUG_LOG() << "newName : " << newName;
|
||||
DEBUG_LOG(m_logger) << "newName : " << newName;
|
||||
fileContentReq.name(newName.toStdString());
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ void FlmHandler::createHQNotification(const int partyId, const int folderId, con
|
||||
notif.expiryTime(expiryTime);
|
||||
|
||||
int prio = s->getInteger(QStringLiteral("NOM/notificationPriority"), 3);
|
||||
DEBUG_LOG() << " Setting: NotificationPriority: " << prio;
|
||||
DEBUG_LOG(m_logger) << " Setting: NotificationPriority: " << prio;
|
||||
notif.priority(static_cast<NotificationManagement::Priority_def::type>(prio));
|
||||
notif.processedPriority(NotificationManagement::Priority_def::Low);
|
||||
notif.exerciseId(m_exerciseId);
|
||||
@@ -191,7 +191,7 @@ void FlmHandler::createHQNotification(const int partyId, const int folderId, con
|
||||
notifReq.notification(notif);
|
||||
|
||||
if (!m_ftcNom->createNotificationRequest(notifReq, this))
|
||||
ERROR_LOG() << "Error requesting create Notification data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create Notification data";
|
||||
}
|
||||
|
||||
void FlmHandler::initHQFolders(int partyId)
|
||||
@@ -201,7 +201,7 @@ void FlmHandler::initHQFolders(int partyId)
|
||||
|
||||
if (exerciseFolderId <= 0)
|
||||
{
|
||||
ERROR_LOG() << "No exercise Folder for exerciseId: " << m_exerciseId;
|
||||
ERROR_LOG(m_logger) << "No exercise Folder for exerciseId: " << m_exerciseId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -220,27 +220,27 @@ void FlmHandler::initHQFolders(int partyId)
|
||||
|
||||
void FlmHandler::onFileContentModifyReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
DEBUG_LOG() << "Got Function Reply: " << reply.translated();
|
||||
DEBUG_LOG(m_logger) << "Got Function Reply: " << reply.translated();
|
||||
|
||||
if (reply.error())
|
||||
ERROR_LOG() << "Error while insert HX Message: " << reply.translated() << ", error: " << reply.error();
|
||||
ERROR_LOG(m_logger) << "Error while insert HX Message: " << reply.translated() << ", error: " << reply.error();
|
||||
else
|
||||
createHQNotification(m_partyId, m_folderHXMessagesId, reply.id());
|
||||
}
|
||||
|
||||
void FlmHandler::onPathCreateReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
DEBUG_LOG() << "Got Function Reply: " << reply.translated();
|
||||
DEBUG_LOG(m_logger) << "Got Function Reply: " << reply.translated();
|
||||
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG() << "Error while creating folders: " << reply.translated() << ", error: " << reply.error();
|
||||
ERROR_LOG(m_logger) << "Error while creating folders: " << reply.translated() << ", error: " << reply.error();
|
||||
}
|
||||
}
|
||||
|
||||
void FlmHandler::onCreateNotificationReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG() << "FlmHandler: Got createReply with id " << replyObject.id() << " and errorString " << replyObject.translated();
|
||||
INFO_LOG(m_logger) << "FlmHandler: Got createReply with id " << replyObject.id() << " and errorString " << replyObject.translated();
|
||||
}
|
||||
|
||||
bool FlmHandler::parseContent(const QString &contentString, QMap<QString, QString> &retMap)
|
||||
|
||||
Reference in new issue
Block a user