diff --git a/pkg/rpc/pb/service_node_task.pb.go b/pkg/rpc/pb/service_node_task.pb.go index 19ddac7..fc6c23f 100644 --- a/pkg/rpc/pb/service_node_task.pb.go +++ b/pkg/rpc/pb/service_node_task.pb.go @@ -470,6 +470,54 @@ func (x *DeleteNodeTaskRequest) GetNodeTaskId() int64 { return 0 } +// 批量删除任务 +type DeleteNodeTasksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeTaskIds []int64 `protobuf:"varint,1,rep,packed,name=nodeTaskIds,proto3" json:"nodeTaskIds,omitempty"` +} + +func (x *DeleteNodeTasksRequest) Reset() { + *x = DeleteNodeTasksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_task_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNodeTasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNodeTasksRequest) ProtoMessage() {} + +func (x *DeleteNodeTasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_task_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNodeTasksRequest.ProtoReflect.Descriptor instead. +func (*DeleteNodeTasksRequest) Descriptor() ([]byte, []int) { + return file_service_node_task_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteNodeTasksRequest) GetNodeTaskIds() []int64 { + if x != nil { + return x.NodeTaskIds + } + return nil +} + // 计算正在执行的任务数量 type CountDoingNodeTasksRequest struct { state protoimpl.MessageState @@ -480,7 +528,7 @@ type CountDoingNodeTasksRequest struct { func (x *CountDoingNodeTasksRequest) Reset() { *x = CountDoingNodeTasksRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_node_task_proto_msgTypes[9] + mi := &file_service_node_task_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -493,7 +541,7 @@ func (x *CountDoingNodeTasksRequest) String() string { func (*CountDoingNodeTasksRequest) ProtoMessage() {} func (x *CountDoingNodeTasksRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_node_task_proto_msgTypes[9] + mi := &file_service_node_task_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -506,7 +554,7 @@ func (x *CountDoingNodeTasksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CountDoingNodeTasksRequest.ProtoReflect.Descriptor instead. func (*CountDoingNodeTasksRequest) Descriptor() ([]byte, []int) { - return file_service_node_task_proto_rawDescGZIP(), []int{9} + return file_service_node_task_proto_rawDescGZIP(), []int{10} } // 查找需要通知的任务 @@ -521,7 +569,7 @@ type FindNotifyingNodeTasksRequest struct { func (x *FindNotifyingNodeTasksRequest) Reset() { *x = FindNotifyingNodeTasksRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_node_task_proto_msgTypes[10] + mi := &file_service_node_task_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -534,7 +582,7 @@ func (x *FindNotifyingNodeTasksRequest) String() string { func (*FindNotifyingNodeTasksRequest) ProtoMessage() {} func (x *FindNotifyingNodeTasksRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_node_task_proto_msgTypes[10] + mi := &file_service_node_task_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -547,7 +595,7 @@ func (x *FindNotifyingNodeTasksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindNotifyingNodeTasksRequest.ProtoReflect.Descriptor instead. func (*FindNotifyingNodeTasksRequest) Descriptor() ([]byte, []int) { - return file_service_node_task_proto_rawDescGZIP(), []int{10} + return file_service_node_task_proto_rawDescGZIP(), []int{11} } func (x *FindNotifyingNodeTasksRequest) GetSize() int64 { @@ -568,7 +616,7 @@ type FindNotifyingNodeTasksResponse struct { func (x *FindNotifyingNodeTasksResponse) Reset() { *x = FindNotifyingNodeTasksResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_node_task_proto_msgTypes[11] + mi := &file_service_node_task_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -581,7 +629,7 @@ func (x *FindNotifyingNodeTasksResponse) String() string { func (*FindNotifyingNodeTasksResponse) ProtoMessage() {} func (x *FindNotifyingNodeTasksResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_node_task_proto_msgTypes[11] + mi := &file_service_node_task_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -594,7 +642,7 @@ func (x *FindNotifyingNodeTasksResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FindNotifyingNodeTasksResponse.ProtoReflect.Descriptor instead. func (*FindNotifyingNodeTasksResponse) Descriptor() ([]byte, []int) { - return file_service_node_task_proto_rawDescGZIP(), []int{11} + return file_service_node_task_proto_rawDescGZIP(), []int{12} } func (x *FindNotifyingNodeTasksResponse) GetNodeTasks() []*NodeTask { @@ -616,7 +664,7 @@ type UpdateNodeTasksNotifiedRequest struct { func (x *UpdateNodeTasksNotifiedRequest) Reset() { *x = UpdateNodeTasksNotifiedRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_node_task_proto_msgTypes[12] + mi := &file_service_node_task_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -629,7 +677,7 @@ func (x *UpdateNodeTasksNotifiedRequest) String() string { func (*UpdateNodeTasksNotifiedRequest) ProtoMessage() {} func (x *UpdateNodeTasksNotifiedRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_node_task_proto_msgTypes[12] + mi := &file_service_node_task_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -642,7 +690,7 @@ func (x *UpdateNodeTasksNotifiedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateNodeTasksNotifiedRequest.ProtoReflect.Descriptor instead. func (*UpdateNodeTasksNotifiedRequest) Descriptor() ([]byte, []int) { - return file_service_node_task_proto_rawDescGZIP(), []int{12} + return file_service_node_task_proto_rawDescGZIP(), []int{13} } func (x *UpdateNodeTasksNotifiedRequest) GetNodeTaskIds() []int64 { @@ -698,62 +746,70 @@ var file_service_node_task_proto_rawDesc = []byte{ 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x6f, 0x64, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4c, 0x0a, 0x1e, 0x46, 0x69, - 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, - 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x6e, - 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x42, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x6f, 0x69, 0x6e, + 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x33, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, + 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4c, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x22, 0x42, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x6f, 0x64, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x32, 0xbc, 0x05, 0x0a, 0x0f, 0x4e, 0x6f, 0x64, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, + 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x43, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x6f, 0x6e, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x4e, + 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, + 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4e, 0x6f, 0x64, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4e, 0x6f, 0x64, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, + 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x13, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x6f, 0x69, 0x6e, + 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, - 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, - 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x32, 0xfd, 0x04, 0x0a, - 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, - 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x66, - 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x64, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x6f, - 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, - 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x78, 0x69, 0x73, 0x74, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x4b, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, - 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, - 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x65, 0x64, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -768,7 +824,7 @@ func file_service_node_task_proto_rawDescGZIP() []byte { return file_service_node_task_proto_rawDescData } -var file_service_node_task_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_service_node_task_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_service_node_task_proto_goTypes = []interface{}{ (*FindNodeTasksRequest)(nil), // 0: pb.FindNodeTasksRequest (*FindNodeTasksResponse)(nil), // 1: pb.FindNodeTasksResponse @@ -779,37 +835,40 @@ var file_service_node_task_proto_goTypes = []interface{}{ (*ExistsNodeTasksRequest)(nil), // 6: pb.ExistsNodeTasksRequest (*ExistsNodeTasksResponse)(nil), // 7: pb.ExistsNodeTasksResponse (*DeleteNodeTaskRequest)(nil), // 8: pb.DeleteNodeTaskRequest - (*CountDoingNodeTasksRequest)(nil), // 9: pb.CountDoingNodeTasksRequest - (*FindNotifyingNodeTasksRequest)(nil), // 10: pb.FindNotifyingNodeTasksRequest - (*FindNotifyingNodeTasksResponse)(nil), // 11: pb.FindNotifyingNodeTasksResponse - (*UpdateNodeTasksNotifiedRequest)(nil), // 12: pb.UpdateNodeTasksNotifiedRequest - (*NodeTask)(nil), // 13: pb.NodeTask - (*RPCSuccess)(nil), // 14: pb.RPCSuccess - (*RPCCountResponse)(nil), // 15: pb.RPCCountResponse + (*DeleteNodeTasksRequest)(nil), // 9: pb.DeleteNodeTasksRequest + (*CountDoingNodeTasksRequest)(nil), // 10: pb.CountDoingNodeTasksRequest + (*FindNotifyingNodeTasksRequest)(nil), // 11: pb.FindNotifyingNodeTasksRequest + (*FindNotifyingNodeTasksResponse)(nil), // 12: pb.FindNotifyingNodeTasksResponse + (*UpdateNodeTasksNotifiedRequest)(nil), // 13: pb.UpdateNodeTasksNotifiedRequest + (*NodeTask)(nil), // 14: pb.NodeTask + (*RPCSuccess)(nil), // 15: pb.RPCSuccess + (*RPCCountResponse)(nil), // 16: pb.RPCCountResponse } var file_service_node_task_proto_depIdxs = []int32{ - 13, // 0: pb.FindNodeTasksResponse.nodeTasks:type_name -> pb.NodeTask + 14, // 0: pb.FindNodeTasksResponse.nodeTasks:type_name -> pb.NodeTask 5, // 1: pb.FindNodeClusterTasksResponse.clusterTasks:type_name -> pb.ClusterTask - 13, // 2: pb.ClusterTask.nodeTasks:type_name -> pb.NodeTask - 13, // 3: pb.FindNotifyingNodeTasksResponse.nodeTasks:type_name -> pb.NodeTask + 14, // 2: pb.ClusterTask.nodeTasks:type_name -> pb.NodeTask + 14, // 3: pb.FindNotifyingNodeTasksResponse.nodeTasks:type_name -> pb.NodeTask 0, // 4: pb.NodeTaskService.findNodeTasks:input_type -> pb.FindNodeTasksRequest 2, // 5: pb.NodeTaskService.reportNodeTaskDone:input_type -> pb.ReportNodeTaskDoneRequest 3, // 6: pb.NodeTaskService.findNodeClusterTasks:input_type -> pb.FindNodeClusterTasksRequest 6, // 7: pb.NodeTaskService.existsNodeTasks:input_type -> pb.ExistsNodeTasksRequest 8, // 8: pb.NodeTaskService.deleteNodeTask:input_type -> pb.DeleteNodeTaskRequest - 9, // 9: pb.NodeTaskService.countDoingNodeTasks:input_type -> pb.CountDoingNodeTasksRequest - 10, // 10: pb.NodeTaskService.findNotifyingNodeTasks:input_type -> pb.FindNotifyingNodeTasksRequest - 12, // 11: pb.NodeTaskService.updateNodeTasksNotified:input_type -> pb.UpdateNodeTasksNotifiedRequest - 1, // 12: pb.NodeTaskService.findNodeTasks:output_type -> pb.FindNodeTasksResponse - 14, // 13: pb.NodeTaskService.reportNodeTaskDone:output_type -> pb.RPCSuccess - 4, // 14: pb.NodeTaskService.findNodeClusterTasks:output_type -> pb.FindNodeClusterTasksResponse - 7, // 15: pb.NodeTaskService.existsNodeTasks:output_type -> pb.ExistsNodeTasksResponse - 14, // 16: pb.NodeTaskService.deleteNodeTask:output_type -> pb.RPCSuccess - 15, // 17: pb.NodeTaskService.countDoingNodeTasks:output_type -> pb.RPCCountResponse - 11, // 18: pb.NodeTaskService.findNotifyingNodeTasks:output_type -> pb.FindNotifyingNodeTasksResponse - 14, // 19: pb.NodeTaskService.updateNodeTasksNotified:output_type -> pb.RPCSuccess - 12, // [12:20] is the sub-list for method output_type - 4, // [4:12] is the sub-list for method input_type + 9, // 9: pb.NodeTaskService.deleteNodeTasks:input_type -> pb.DeleteNodeTasksRequest + 10, // 10: pb.NodeTaskService.countDoingNodeTasks:input_type -> pb.CountDoingNodeTasksRequest + 11, // 11: pb.NodeTaskService.findNotifyingNodeTasks:input_type -> pb.FindNotifyingNodeTasksRequest + 13, // 12: pb.NodeTaskService.updateNodeTasksNotified:input_type -> pb.UpdateNodeTasksNotifiedRequest + 1, // 13: pb.NodeTaskService.findNodeTasks:output_type -> pb.FindNodeTasksResponse + 15, // 14: pb.NodeTaskService.reportNodeTaskDone:output_type -> pb.RPCSuccess + 4, // 15: pb.NodeTaskService.findNodeClusterTasks:output_type -> pb.FindNodeClusterTasksResponse + 7, // 16: pb.NodeTaskService.existsNodeTasks:output_type -> pb.ExistsNodeTasksResponse + 15, // 17: pb.NodeTaskService.deleteNodeTask:output_type -> pb.RPCSuccess + 15, // 18: pb.NodeTaskService.deleteNodeTasks:output_type -> pb.RPCSuccess + 16, // 19: pb.NodeTaskService.countDoingNodeTasks:output_type -> pb.RPCCountResponse + 12, // 20: pb.NodeTaskService.findNotifyingNodeTasks:output_type -> pb.FindNotifyingNodeTasksResponse + 15, // 21: pb.NodeTaskService.updateNodeTasksNotified:output_type -> pb.RPCSuccess + 13, // [13:22] is the sub-list for method output_type + 4, // [4:13] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name @@ -932,7 +991,7 @@ func file_service_node_task_proto_init() { } } file_service_node_task_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountDoingNodeTasksRequest); i { + switch v := v.(*DeleteNodeTasksRequest); i { case 0: return &v.state case 1: @@ -944,7 +1003,7 @@ func file_service_node_task_proto_init() { } } file_service_node_task_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindNotifyingNodeTasksRequest); i { + switch v := v.(*CountDoingNodeTasksRequest); i { case 0: return &v.state case 1: @@ -956,7 +1015,7 @@ func file_service_node_task_proto_init() { } } file_service_node_task_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindNotifyingNodeTasksResponse); i { + switch v := v.(*FindNotifyingNodeTasksRequest); i { case 0: return &v.state case 1: @@ -968,6 +1027,18 @@ func file_service_node_task_proto_init() { } } file_service_node_task_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindNotifyingNodeTasksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_task_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateNodeTasksNotifiedRequest); i { case 0: return &v.state @@ -986,7 +1057,7 @@ func file_service_node_task_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_node_task_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, @@ -1022,6 +1093,8 @@ type NodeTaskServiceClient interface { ExistsNodeTasks(ctx context.Context, in *ExistsNodeTasksRequest, opts ...grpc.CallOption) (*ExistsNodeTasksResponse, error) // 删除任务 DeleteNodeTask(ctx context.Context, in *DeleteNodeTaskRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 批量删除任务 + DeleteNodeTasks(ctx context.Context, in *DeleteNodeTasksRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 计算正在执行的任务数量 CountDoingNodeTasks(ctx context.Context, in *CountDoingNodeTasksRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) // 查找需要通知的任务 @@ -1083,6 +1156,15 @@ func (c *nodeTaskServiceClient) DeleteNodeTask(ctx context.Context, in *DeleteNo return out, nil } +func (c *nodeTaskServiceClient) DeleteNodeTasks(ctx context.Context, in *DeleteNodeTasksRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NodeTaskService/deleteNodeTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *nodeTaskServiceClient) CountDoingNodeTasks(ctx context.Context, in *CountDoingNodeTasksRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { out := new(RPCCountResponse) err := c.cc.Invoke(ctx, "/pb.NodeTaskService/countDoingNodeTasks", in, out, opts...) @@ -1122,6 +1204,8 @@ type NodeTaskServiceServer interface { ExistsNodeTasks(context.Context, *ExistsNodeTasksRequest) (*ExistsNodeTasksResponse, error) // 删除任务 DeleteNodeTask(context.Context, *DeleteNodeTaskRequest) (*RPCSuccess, error) + // 批量删除任务 + DeleteNodeTasks(context.Context, *DeleteNodeTasksRequest) (*RPCSuccess, error) // 计算正在执行的任务数量 CountDoingNodeTasks(context.Context, *CountDoingNodeTasksRequest) (*RPCCountResponse, error) // 查找需要通知的任务 @@ -1149,6 +1233,9 @@ func (*UnimplementedNodeTaskServiceServer) ExistsNodeTasks(context.Context, *Exi func (*UnimplementedNodeTaskServiceServer) DeleteNodeTask(context.Context, *DeleteNodeTaskRequest) (*RPCSuccess, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteNodeTask not implemented") } +func (*UnimplementedNodeTaskServiceServer) DeleteNodeTasks(context.Context, *DeleteNodeTasksRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNodeTasks not implemented") +} func (*UnimplementedNodeTaskServiceServer) CountDoingNodeTasks(context.Context, *CountDoingNodeTasksRequest) (*RPCCountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CountDoingNodeTasks not implemented") } @@ -1253,6 +1340,24 @@ func _NodeTaskService_DeleteNodeTask_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _NodeTaskService_DeleteNodeTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNodeTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeTaskServiceServer).DeleteNodeTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodeTaskService/DeleteNodeTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeTaskServiceServer).DeleteNodeTasks(ctx, req.(*DeleteNodeTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _NodeTaskService_CountDoingNodeTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CountDoingNodeTasksRequest) if err := dec(in); err != nil { @@ -1331,6 +1436,10 @@ var _NodeTaskService_serviceDesc = grpc.ServiceDesc{ MethodName: "deleteNodeTask", Handler: _NodeTaskService_DeleteNodeTask_Handler, }, + { + MethodName: "deleteNodeTasks", + Handler: _NodeTaskService_DeleteNodeTasks_Handler, + }, { MethodName: "countDoingNodeTasks", Handler: _NodeTaskService_CountDoingNodeTasks_Handler, diff --git a/pkg/rpc/protos/service_node_task.proto b/pkg/rpc/protos/service_node_task.proto index 25d2fba..e811c3d 100644 --- a/pkg/rpc/protos/service_node_task.proto +++ b/pkg/rpc/protos/service_node_task.proto @@ -23,6 +23,9 @@ service NodeTaskService { // 删除任务 rpc deleteNodeTask (DeleteNodeTaskRequest) returns (RPCSuccess); + // 批量删除任务 + rpc deleteNodeTasks (DeleteNodeTasksRequest) returns (RPCSuccess); + // 计算正在执行的任务数量 rpc countDoingNodeTasks (CountDoingNodeTasksRequest) returns (RPCCountResponse); @@ -79,6 +82,11 @@ message DeleteNodeTaskRequest { int64 nodeTaskId = 1; } +// 批量删除任务 +message DeleteNodeTasksRequest { + repeated int64 nodeTaskIds = 1; +} + // 计算正在执行的任务数量 message CountDoingNodeTasksRequest {