|
@@ -330,6 +330,20 @@ void ResourceWatcherFSM::TriggerProccessUpload()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void ResourceWatcherFSM::TriggerFileListUpload()
|
|
|
+{
|
|
|
+ CSmartPointer<IConfigInfo> spCtSettingConfig;
|
|
|
+ //集中配置读取需要上送的路径
|
|
|
+ CSimpleStringA fileListPath("");
|
|
|
+ spCtSettingConfig->ReadConfigValue(m_pEntity->GetEntityName(), "DirPathToUploadFileList", fileListPath);
|
|
|
+ if (!fileListPath.IsNullOrEmpty())
|
|
|
+ {
|
|
|
+ m_fileListPath = fileListPath.Split('|');
|
|
|
+ UploadDirPathFileListTask* uploadFileListTask = new UploadDirPathFileListTask(this);
|
|
|
+ GetEntityBase()->GetFunction()->PostThreadPoolTask(uploadFileListTask);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
ErrorCodeEnum ResourceWatcherFSM::OnInit()
|
|
|
{
|
|
|
neverMainPage = true; //是否未进入过首页
|
|
@@ -359,15 +373,6 @@ ErrorCodeEnum ResourceWatcherFSM::OnInit()
|
|
|
m_skipDesktopDetect = TRUE;
|
|
|
}
|
|
|
spRunConfig->ReadConfigValueInt("WarnRecord", "disk", m_diskLastWarnHour);
|
|
|
- //集中配置读取需要上送的路径
|
|
|
- CSimpleStringA fileListPath("");
|
|
|
- spCtSettingConfig->ReadConfigValue(m_pEntity->GetEntityName(), "DirPathToUploadFileList", fileListPath);
|
|
|
- if (!fileListPath.IsNullOrEmpty())
|
|
|
- {
|
|
|
- m_fileListPath = fileListPath.Split('|');
|
|
|
- UploadDirPathFileListTask* uploadFileListTask = new UploadDirPathFileListTask(this);
|
|
|
- GetEntityBase()->GetFunction()->PostThreadPoolTask(uploadFileListTask);
|
|
|
- }
|
|
|
|
|
|
return Error_Succeed;
|
|
|
}
|
|
@@ -4967,12 +4972,12 @@ void ResourceWatcherFSM::UploadDirPathFileList(CSimpleStringA dirFilePath)
|
|
|
if (attrs == INVALID_FILE_ATTRIBUTES)
|
|
|
{
|
|
|
const DWORD lastError = GetLastError();
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Acess to path error:[%s], GLE = %u.", realPath.GetData(), lastError);
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA5A15")("Acess to path error:[%s], GLE = %u.", realPath.GetData(), lastError);
|
|
|
return;
|
|
|
}
|
|
|
else if (!(attrs & FILE_ATTRIBUTE_DIRECTORY))
|
|
|
{ //非文件夹类型
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Path [%s] is not Directory!", realPath.GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA5A15")("Path [%s] is not Directory!", realPath.GetData());
|
|
|
return;
|
|
|
}
|
|
|
|