支持显示运行进度
This commit is contained in:
31
cmd.pb.go
31
cmd.pb.go
@@ -1327,10 +1327,12 @@ type Task struct {
|
|||||||
SourcePath string `protobuf:"bytes,7,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"` // 任务数据源路径
|
SourcePath string `protobuf:"bytes,7,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"` // 任务数据源路径
|
||||||
TaskSize uint64 `protobuf:"varint,8,opt,name=task_size,json=taskSize,proto3" json:"task_size,omitempty"` // 任务所有文件的总大小
|
TaskSize uint64 `protobuf:"varint,8,opt,name=task_size,json=taskSize,proto3" json:"task_size,omitempty"` // 任务所有文件的总大小
|
||||||
// 以下字段只在返回时填写,用于提供服务端的任务状态。在请求时填写会被忽略
|
// 以下字段只在返回时填写,用于提供服务端的任务状态。在请求时填写会被忽略
|
||||||
CreateTime string `protobuf:"bytes,10,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间
|
CreateTime string `protobuf:"bytes,10,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间
|
||||||
RunTime string `protobuf:"bytes,11,opt,name=run_time,json=runTime,proto3" json:"run_time,omitempty"` // 运行时间
|
RunTime string `protobuf:"bytes,11,opt,name=run_time,json=runTime,proto3" json:"run_time,omitempty"` // 运行时间
|
||||||
FinishTime string `protobuf:"bytes,12,opt,name=finish_time,json=finishTime,proto3" json:"finish_time,omitempty"` // 完成时间
|
FinishTime string `protobuf:"bytes,12,opt,name=finish_time,json=finishTime,proto3" json:"finish_time,omitempty"` // 完成时间
|
||||||
Status TaskStatus `protobuf:"varint,15,opt,name=status,proto3,enum=saasapi.TaskStatus" json:"status,omitempty"` // 任务状态
|
RunningBlock uint32 `protobuf:"varint,13,opt,name=running_block,json=runningBlock,proto3" json:"running_block,omitempty"` // 正在运行的块编号
|
||||||
|
TotalBlock uint32 `protobuf:"varint,14,opt,name=total_block,json=totalBlock,proto3" json:"total_block,omitempty"` // 总块数
|
||||||
|
Status TaskStatus `protobuf:"varint,15,opt,name=status,proto3,enum=saasapi.TaskStatus" json:"status,omitempty"` // 任务状态
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -1442,6 +1444,20 @@ func (x *Task) GetFinishTime() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Task) GetRunningBlock() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RunningBlock
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Task) GetTotalBlock() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.TotalBlock
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *Task) GetStatus() TaskStatus {
|
func (x *Task) GetStatus() TaskStatus {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Status
|
return x.Status
|
||||||
@@ -3148,7 +3164,7 @@ const file_cmd_proto_rawDesc = "" +
|
|||||||
"\vwrite_bytes\x18\x03 \x01(\v2\x0e.saasapi.BytesR\n" +
|
"\vwrite_bytes\x18\x03 \x01(\v2\x0e.saasapi.BytesR\n" +
|
||||||
"writeBytes\x125\n" +
|
"writeBytes\x125\n" +
|
||||||
"\rwrite_uint32s\x18\x04 \x01(\v2\x10.saasapi.Uint32sR\fwriteUint32s\x12O\n" +
|
"\rwrite_uint32s\x18\x04 \x01(\v2\x10.saasapi.Uint32sR\fwriteUint32s\x12O\n" +
|
||||||
"\x17write_flags_with_expire\x18\x05 \x01(\v2\x18.saasapi.FlagsWithExpireR\x14writeFlagsWithExpire\"\xb6\x03\n" +
|
"\x17write_flags_with_expire\x18\x05 \x01(\v2\x18.saasapi.FlagsWithExpireR\x14writeFlagsWithExpire\"\xfc\x03\n" +
|
||||||
"\x04Task\x12!\n" +
|
"\x04Task\x12!\n" +
|
||||||
"\fdataspace_id\x18\x01 \x01(\tR\vdataspaceId\x12\x14\n" +
|
"\fdataspace_id\x18\x01 \x01(\tR\vdataspaceId\x12\x14\n" +
|
||||||
"\x05appid\x18\x02 \x01(\tR\x05appid\x12\x1f\n" +
|
"\x05appid\x18\x02 \x01(\tR\x05appid\x12\x1f\n" +
|
||||||
@@ -3165,7 +3181,10 @@ const file_cmd_proto_rawDesc = "" +
|
|||||||
"createTime\x12\x19\n" +
|
"createTime\x12\x19\n" +
|
||||||
"\brun_time\x18\v \x01(\tR\arunTime\x12\x1f\n" +
|
"\brun_time\x18\v \x01(\tR\arunTime\x12\x1f\n" +
|
||||||
"\vfinish_time\x18\f \x01(\tR\n" +
|
"\vfinish_time\x18\f \x01(\tR\n" +
|
||||||
"finishTime\x12+\n" +
|
"finishTime\x12#\n" +
|
||||||
|
"\rrunning_block\x18\r \x01(\rR\frunningBlock\x12\x1f\n" +
|
||||||
|
"\vtotal_block\x18\x0e \x01(\rR\n" +
|
||||||
|
"totalBlock\x12+\n" +
|
||||||
"\x06status\x18\x0f \x01(\x0e2\x13.saasapi.TaskStatusR\x06status\"D\n" +
|
"\x06status\x18\x0f \x01(\x0e2\x13.saasapi.TaskStatusR\x06status\"D\n" +
|
||||||
"\bTaskList\x128\n" +
|
"\bTaskList\x128\n" +
|
||||||
"\rstatus_filter\x18\x01 \x01(\x0e2\x13.saasapi.TaskStatusR\fstatusFilter\"*\n" +
|
"\rstatus_filter\x18\x01 \x01(\x0e2\x13.saasapi.TaskStatusR\fstatusFilter\"*\n" +
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ message Task {
|
|||||||
string create_time = 10; // 创建时间
|
string create_time = 10; // 创建时间
|
||||||
string run_time = 11; // 运行时间
|
string run_time = 11; // 运行时间
|
||||||
string finish_time = 12; // 完成时间
|
string finish_time = 12; // 完成时间
|
||||||
|
uint32 running_block = 13; // 正在运行的块编号
|
||||||
|
uint32 total_block = 14; // 总块数
|
||||||
|
|
||||||
TaskStatus status = 15; // 任务状态
|
TaskStatus status = 15; // 任务状态
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM rta-docker.pkg.coding.net/public/docker/entre_dev:latest AS builder
|
FROM registry.algo.com.cn/public/entre_dev:latest AS builder
|
||||||
|
|
||||||
COPY . /tmp/saasapi/
|
COPY . /tmp/saasapi/
|
||||||
WORKDIR /tmp/saasapi/
|
WORKDIR /tmp/saasapi/
|
||||||
@@ -7,6 +7,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
|||||||
--mount=type=cache,target=/go/pkg \
|
--mount=type=cache,target=/go/pkg \
|
||||||
./make.sh
|
./make.sh
|
||||||
|
|
||||||
FROM rta-docker.pkg.coding.net/public/docker/alpine:latest AS product
|
FROM registry.algo.com.cn/public/alpine:latest AS product
|
||||||
|
|
||||||
COPY --from=builder /tmp/saasapi/build/saastool /bin/saastool
|
COPY --from=builder /tmp/saasapi/build/saastool /bin/saastool
|
||||||
|
|||||||
Reference in New Issue
Block a user