修改存储路径

This commit is contained in:
wangjian 2023-04-04 18:22:01 +08:00
parent 3556c6df3f
commit 0702bbda0d
4 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ type FolderMonitorConfig struct {
Name string `yaml:"name" json:"name" toml:"name"` Name string `yaml:"name" json:"name" toml:"name"`
MonitorPath string `json:"monitorPath" yaml:"monitorPath" toml:"monitorPath"` MonitorPath string `json:"monitorPath" yaml:"monitorPath" toml:"monitorPath"`
TempPath string `json:"tempPath" yaml:"tempPath" toml:"tempPath"` TempPath string `json:"tempPath" yaml:"tempPath" toml:"tempPath"`
DataType int `json:"dataType" yaml:"dataType" toml:"dataType"` //1:数据集;2:病害库
DatasetId int `yaml:"datasetId" json:"datasetId" toml:"datasetId"` DatasetId int `yaml:"datasetId" json:"datasetId" toml:"datasetId"`
Logging LogOptions `yaml:"logging" json:"logging" tom:"logging"` Logging LogOptions `yaml:"logging" json:"logging" tom:"logging"`
Node HpdsNode `yaml:"node,omitempty" json:"node,omitempty" toml:"node,omitempty"` Node HpdsNode `yaml:"node,omitempty" json:"node,omitempty" toml:"node,omitempty"`

View File

@ -2,6 +2,7 @@ name: "folder_monitoring"
monitorPath: "./src/" monitorPath: "./src/"
tempPath: "./tmp/" tempPath: "./tmp/"
datasetId: 1 datasetId: 1
dataType: 1
node: node:
host: 127.0.0.1 host: 127.0.0.1
port: 27188 port: 27188

View File

@ -188,6 +188,7 @@ func transferData(list *arraylist.List) {
FileName: filepath.Base(fileName), FileName: filepath.Base(fileName),
FilePath: strings.Replace(FileHistoryMap[fileName].FilePath, Cfg.MonitorPath, "", -1), FilePath: strings.Replace(FileHistoryMap[fileName].FilePath, Cfg.MonitorPath, "", -1),
DatasetId: Cfg.DatasetId, DatasetId: Cfg.DatasetId,
DataType: Cfg.DataType,
FileSize: len(src), FileSize: len(src),
File: base64.StdEncoding.EncodeToString(dstContent), File: base64.StdEncoding.EncodeToString(dstContent),
IsCompress: true, IsCompress: true,

View File

@ -12,6 +12,7 @@ type InstructionReq struct {
type FileTransferInfo struct { type FileTransferInfo struct {
FileName string `json:"fileName"` FileName string `json:"fileName"`
FilePath string `json:"filePath"` FilePath string `json:"filePath"`
DataType int `json:"dataType"`
DatasetId int `json:"datasetId"` DatasetId int `json:"datasetId"`
FileSize int `json:"fileSize"` FileSize int `json:"fileSize"`
File string `json:"file"` File string `json:"file"`