mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-30 14:56:19 +00:00
## What changed? - Recorded the idle expiration time into the SchedulerIdleTask. ## Why? - The CHASM scheduler's idle expiration time is controlled by dynamic config. If this value changes after the idle task has been pushed, it would have inadvertedly invalidated itself. Now, DC changes are handled gracefully. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s)
288 lines
10 KiB
Go
288 lines
10 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// plugins:
|
|
// protoc-gen-go
|
|
// protoc
|
|
// source: temporal/server/chasm/lib/scheduler/proto/v1/tasks.proto
|
|
|
|
package schedulerpb
|
|
|
|
import (
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Fires when the scheduler's idle period has lapsed, and the scheduler should
|
|
// be closed.
|
|
type SchedulerIdleTask struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Idle time total is set at time of task creation, so that if the dynamic config key
|
|
// controlling idle time changes, task validation will be aware.
|
|
IdleTimeTotal *durationpb.Duration `protobuf:"bytes,1,opt,name=idle_time_total,json=idleTimeTotal,proto3" json:"idle_time_total,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SchedulerIdleTask) Reset() {
|
|
*x = SchedulerIdleTask{}
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SchedulerIdleTask) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SchedulerIdleTask) ProtoMessage() {}
|
|
|
|
func (x *SchedulerIdleTask) ProtoReflect() protoreflect.Message {
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SchedulerIdleTask.ProtoReflect.Descriptor instead.
|
|
func (*SchedulerIdleTask) Descriptor() ([]byte, []int) {
|
|
return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *SchedulerIdleTask) GetIdleTimeTotal() *durationpb.Duration {
|
|
if x != nil {
|
|
return x.IdleTimeTotal
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Buffers actions based on the schedule's specification.
|
|
type GeneratorTask struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GeneratorTask) Reset() {
|
|
*x = GeneratorTask{}
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GeneratorTask) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GeneratorTask) ProtoMessage() {}
|
|
|
|
func (x *GeneratorTask) ProtoReflect() protoreflect.Message {
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GeneratorTask.ProtoReflect.Descriptor instead.
|
|
func (*GeneratorTask) Descriptor() ([]byte, []int) {
|
|
return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
// Processes buffered actions, deciding whether to execute, delay, or discard.
|
|
type InvokerProcessBufferTask struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *InvokerProcessBufferTask) Reset() {
|
|
*x = InvokerProcessBufferTask{}
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *InvokerProcessBufferTask) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*InvokerProcessBufferTask) ProtoMessage() {}
|
|
|
|
func (x *InvokerProcessBufferTask) ProtoReflect() protoreflect.Message {
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use InvokerProcessBufferTask.ProtoReflect.Descriptor instead.
|
|
func (*InvokerProcessBufferTask) Descriptor() ([]byte, []int) {
|
|
return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
// Drives execution of pending buffered actions to completion by starting,
|
|
// canceling, or terminating workflows.
|
|
type InvokerExecuteTask struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *InvokerExecuteTask) Reset() {
|
|
*x = InvokerExecuteTask{}
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *InvokerExecuteTask) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*InvokerExecuteTask) ProtoMessage() {}
|
|
|
|
func (x *InvokerExecuteTask) ProtoReflect() protoreflect.Message {
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use InvokerExecuteTask.ProtoReflect.Descriptor instead.
|
|
func (*InvokerExecuteTask) Descriptor() ([]byte, []int) {
|
|
return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
// Buffers actions based on a manually-requested backfill.
|
|
type BackfillerTask struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *BackfillerTask) Reset() {
|
|
*x = BackfillerTask{}
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *BackfillerTask) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*BackfillerTask) ProtoMessage() {}
|
|
|
|
func (x *BackfillerTask) ProtoReflect() protoreflect.Message {
|
|
mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use BackfillerTask.ProtoReflect.Descriptor instead.
|
|
func (*BackfillerTask) Descriptor() ([]byte, []int) {
|
|
return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
var File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto protoreflect.FileDescriptor
|
|
|
|
const file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc = "" +
|
|
"\n" +
|
|
"8temporal/server/chasm/lib/scheduler/proto/v1/tasks.proto\x12,temporal.server.chasm.lib.scheduler.proto.v1\x1a\x1egoogle/protobuf/duration.proto\"V\n" +
|
|
"\x11SchedulerIdleTask\x12A\n" +
|
|
"\x0fidle_time_total\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\ridleTimeTotal\"\x0f\n" +
|
|
"\rGeneratorTask\"\x1a\n" +
|
|
"\x18InvokerProcessBufferTask\"\x14\n" +
|
|
"\x12InvokerExecuteTask\"\x10\n" +
|
|
"\x0eBackfillerTaskBGZEgo.temporal.io/server/chasm/lib/scheduler/gen/schedulerpb;schedulerpbb\x06proto3"
|
|
|
|
var (
|
|
file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescOnce sync.Once
|
|
file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP() []byte {
|
|
file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescOnce.Do(func() {
|
|
file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc)))
|
|
})
|
|
return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData
|
|
}
|
|
|
|
var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes = []any{
|
|
(*SchedulerIdleTask)(nil), // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerIdleTask
|
|
(*GeneratorTask)(nil), // 1: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorTask
|
|
(*InvokerProcessBufferTask)(nil), // 2: temporal.server.chasm.lib.scheduler.proto.v1.InvokerProcessBufferTask
|
|
(*InvokerExecuteTask)(nil), // 3: temporal.server.chasm.lib.scheduler.proto.v1.InvokerExecuteTask
|
|
(*BackfillerTask)(nil), // 4: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerTask
|
|
(*durationpb.Duration)(nil), // 5: google.protobuf.Duration
|
|
}
|
|
var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs = []int32{
|
|
5, // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerIdleTask.idle_time_total:type_name -> google.protobuf.Duration
|
|
1, // [1:1] is the sub-list for method output_type
|
|
1, // [1:1] is the sub-list for method input_type
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
1, // [1:1] is the sub-list for extension extendee
|
|
0, // [0:1] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_init() }
|
|
func file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_init() {
|
|
if File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes,
|
|
DependencyIndexes: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs,
|
|
MessageInfos: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes,
|
|
}.Build()
|
|
File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto = out.File
|
|
file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes = nil
|
|
file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs = nil
|
|
}
|