From f5e3a3a6785cd9305c476eadf329c8ae00161add Mon Sep 17 00:00:00 2001
From: w1146869587 <wah1146869587@126.com>
Date: 星期二, 09 十一月 2021 17:24:14 +0800
Subject: [PATCH] watch db
---
mbwatch/mbtaskmgr.cpp | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/mbwatch/mbtaskmgr.cpp b/mbwatch/mbtaskmgr.cpp
index 6451fa0..e63cb39 100644
--- a/mbwatch/mbtaskmgr.cpp
+++ b/mbwatch/mbtaskmgr.cpp
@@ -1,9 +1,11 @@
#include "mbtaskmgr.h"
+#include "mbtasklog.h"
CMBTaskMgr::CMBTaskMgr()
{
+ m_pMdWare = NULL;
//绾跨▼姹犳渶澶�涓嚎绋�- m_threadPool.setMaxThreadCount(1);
+ m_threadPool.setMaxThreadCount(3);
}
CMBTaskMgr::~CMBTaskMgr()
@@ -11,14 +13,24 @@
}
+void CMBTaskMgr::setMdWare(CMBMdware *pMdWare)
+{
+ m_pMdWare = pMdWare;
+}
+
void CMBTaskMgr::stopThread()
{
m_threadPool.waitForDone(100); // 100姣
}
-void CMBTaskMgr::logTask(QString login, QString svrID, QString backupDir, QString svrPath)
+void CMBTaskMgr::logTask(QString logDbPath, QString backupDir, QString svrPath)
{
+ CMBTaskLog *pTask = new CMBTaskLog();
+ pTask->setMdWare(m_pMdWare);
+ pTask->set(logDbPath, backupDir, svrPath);
+ pTask->setAutoDelete(true);
+ m_threadPool.start(pTask);
}
--
Gitblit v1.9.1