feat: Make log writing in other thread.

This commit is contained in:
sunwen
2024-09-09 09:51:38 +08:00
parent b60c4a8be9
commit 998e0b187a
9 changed files with 14 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
#include "DmsAsyncAction.h"
#include "dms_mq.h"
#include "log/LogManager.h"
#include <QTimer>
@@ -17,7 +18,6 @@ DmsAsyncAction::DmsAsyncAction(int aServerId, int aActionId, QObject* aObject, c
, mResponseSignal(aResponseSignal)
, mSendData()
, mIsResponsed(false)
, mIsRunning(false)
{
mTimer->setSingleShot(true);
mTimer->setInterval(TIMEOUT_MSEC);
@@ -45,6 +45,7 @@ bool DmsAsyncAction::execute()
{
return false;
}
LOG_SYS_OPERATION(QString("GUI -> DMS : %1-%2, Message:%3").arg(mServerId).arg(mActionId).arg(mSendData));
mTimer->start();
return true;
}