hatchet-sdk 1.5.0__py3-none-any.whl → 1.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hatchet-sdk might be problematic. Click here for more details.
- hatchet_sdk/contracts/v1/workflows_pb2.py +24 -24
- hatchet_sdk/contracts/v1/workflows_pb2.pyi +4 -2
- hatchet_sdk/contracts/workflows_pb2.py +34 -34
- hatchet_sdk/hatchet.py +14 -7
- hatchet_sdk/runnables/types.py +15 -9
- hatchet_sdk/runnables/workflow.py +12 -1
- {hatchet_sdk-1.5.0.dist-info → hatchet_sdk-1.6.0.dist-info}/METADATA +1 -1
- {hatchet_sdk-1.5.0.dist-info → hatchet_sdk-1.6.0.dist-info}/RECORD +10 -10
- {hatchet_sdk-1.5.0.dist-info → hatchet_sdk-1.6.0.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.5.0.dist-info → hatchet_sdk-1.6.0.dist-info}/entry_points.txt +0 -0
|
@@ -16,7 +16,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__
|
|
|
16
16
|
from hatchet_sdk.contracts.v1.shared import condition_pb2 as v1_dot_shared_dot_condition__pb2
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12v1/workflows.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19v1/shared/condition.proto\"Z\n\x12\x43\x61ncelTasksRequest\x12\x13\n\x0b\x65xternalIds\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"Z\n\x12ReplayTasksRequest\x12\x13\n\x0b\x65xternalIds\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"\xb7\x01\n\x0bTasksFilter\x12\x10\n\x08statuses\x18\x01 \x03(\t\x12)\n\x05since\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x05until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x14\n\x0cworkflow_ids\x18\x04 \x03(\t\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x05 \x03(\tB\x08\n\x06_until\".\n\x13\x43\x61ncelTasksResponse\x12\x17\n\x0f\x63\x61ncelled_tasks\x18\x01 \x03(\t\"-\n\x13ReplayTasksResponse\x12\x16\n\x0ereplayed_tasks\x18\x01 \x03(\t\"\x82\x01\n\x19TriggerWorkflowRunRequest\x12\x15\n\rworkflow_name\x18\x01 \x01(\t\x12\r\n\x05input\x18\x02 \x01(\x0c\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x03 \x01(\x0c\x12\x15\n\x08priority\x18\x04 \x01(\x05H\x00\x88\x01\x01\x42\x0b\n\t_priority\"1\n\x1aTriggerWorkflowRunResponse\x12\x13\n\x0b\x65xternal_id\x18\x01 \x01(\t\"\
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12v1/workflows.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19v1/shared/condition.proto\"Z\n\x12\x43\x61ncelTasksRequest\x12\x13\n\x0b\x65xternalIds\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"Z\n\x12ReplayTasksRequest\x12\x13\n\x0b\x65xternalIds\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"\xb7\x01\n\x0bTasksFilter\x12\x10\n\x08statuses\x18\x01 \x03(\t\x12)\n\x05since\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x05until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x14\n\x0cworkflow_ids\x18\x04 \x03(\t\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x05 \x03(\tB\x08\n\x06_until\".\n\x13\x43\x61ncelTasksResponse\x12\x17\n\x0f\x63\x61ncelled_tasks\x18\x01 \x03(\t\"-\n\x13ReplayTasksResponse\x12\x16\n\x0ereplayed_tasks\x18\x01 \x03(\t\"\x82\x01\n\x19TriggerWorkflowRunRequest\x12\x15\n\rworkflow_name\x18\x01 \x01(\t\x12\r\n\x05input\x18\x02 \x01(\x0c\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x03 \x01(\x0c\x12\x15\n\x08priority\x18\x04 \x01(\x05H\x00\x88\x01\x01\x42\x0b\n\t_priority\"1\n\x1aTriggerWorkflowRunResponse\x12\x13\n\x0b\x65xternal_id\x18\x01 \x01(\t\"\xca\x03\n\x1c\x43reateWorkflowVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x16\n\x0e\x65vent_triggers\x18\x04 \x03(\t\x12\x15\n\rcron_triggers\x18\x05 \x03(\t\x12!\n\x05tasks\x18\x06 \x03(\x0b\x32\x12.v1.CreateTaskOpts\x12$\n\x0b\x63oncurrency\x18\x07 \x01(\x0b\x32\x0f.v1.Concurrency\x12\x17\n\ncron_input\x18\x08 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x0fon_failure_task\x18\t \x01(\x0b\x32\x12.v1.CreateTaskOptsH\x01\x88\x01\x01\x12\'\n\x06sticky\x18\n \x01(\x0e\x32\x12.v1.StickyStrategyH\x02\x88\x01\x01\x12\x1d\n\x10\x64\x65\x66\x61ult_priority\x18\x0b \x01(\x05H\x03\x88\x01\x01\x12(\n\x0f\x63oncurrency_arr\x18\x0c \x03(\x0b\x32\x0f.v1.ConcurrencyB\r\n\x0b_cron_inputB\x12\n\x10_on_failure_taskB\t\n\x07_stickyB\x13\n\x11_default_priority\"\x93\x01\n\x0b\x43oncurrency\x12\x12\n\nexpression\x18\x01 \x01(\t\x12\x15\n\x08max_runs\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x39\n\x0elimit_strategy\x18\x03 \x01(\x0e\x32\x1c.v1.ConcurrencyLimitStrategyH\x01\x88\x01\x01\x42\x0b\n\t_max_runsB\x11\n\x0f_limit_strategy\"\xe4\x01\n\x13\x44\x65siredWorkerLabels\x12\x15\n\x08strValue\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08intValue\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x15\n\x08required\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x32\n\ncomparator\x18\x04 \x01(\x0e\x32\x19.v1.WorkerLabelComparatorH\x03\x88\x01\x01\x12\x13\n\x06weight\x18\x05 \x01(\x05H\x04\x88\x01\x01\x42\x0b\n\t_strValueB\x0b\n\t_intValueB\x0b\n\t_requiredB\r\n\x0b_comparatorB\t\n\x07_weight\"\xb1\x04\n\x0e\x43reateTaskOpts\x12\x13\n\x0breadable_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x02 \x01(\t\x12\x0f\n\x07timeout\x18\x03 \x01(\t\x12\x0e\n\x06inputs\x18\x04 \x01(\t\x12\x0f\n\x07parents\x18\x05 \x03(\t\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12,\n\x0brate_limits\x18\x07 \x03(\x0b\x32\x17.v1.CreateTaskRateLimit\x12;\n\rworker_labels\x18\x08 \x03(\x0b\x32$.v1.CreateTaskOpts.WorkerLabelsEntry\x12\x1b\n\x0e\x62\x61\x63koff_factor\x18\t \x01(\x02H\x00\x88\x01\x01\x12 \n\x13\x62\x61\x63koff_max_seconds\x18\n \x01(\x05H\x01\x88\x01\x01\x12$\n\x0b\x63oncurrency\x18\x0b \x03(\x0b\x32\x0f.v1.Concurrency\x12+\n\nconditions\x18\x0c \x01(\x0b\x32\x12.v1.TaskConditionsH\x02\x88\x01\x01\x12\x1d\n\x10schedule_timeout\x18\r \x01(\tH\x03\x88\x01\x01\x1aL\n\x11WorkerLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.v1.DesiredWorkerLabels:\x02\x38\x01\x42\x11\n\x0f_backoff_factorB\x16\n\x14_backoff_max_secondsB\r\n\x0b_conditionsB\x13\n\x11_schedule_timeout\"\xfd\x01\n\x13\x43reateTaskRateLimit\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\x05units\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08key_expr\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nunits_expr\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11limit_values_expr\x18\x05 \x01(\tH\x03\x88\x01\x01\x12,\n\x08\x64uration\x18\x06 \x01(\x0e\x32\x15.v1.RateLimitDurationH\x04\x88\x01\x01\x42\x08\n\x06_unitsB\x0b\n\t_key_exprB\r\n\x0b_units_exprB\x14\n\x12_limit_values_exprB\x0b\n\t_duration\"@\n\x1d\x43reateWorkflowVersionResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t*$\n\x0eStickyStrategy\x12\x08\n\x04SOFT\x10\x00\x12\x08\n\x04HARD\x10\x01*]\n\x11RateLimitDuration\x12\n\n\x06SECOND\x10\x00\x12\n\n\x06MINUTE\x10\x01\x12\x08\n\x04HOUR\x10\x02\x12\x07\n\x03\x44\x41Y\x10\x03\x12\x08\n\x04WEEK\x10\x04\x12\t\n\x05MONTH\x10\x05\x12\x08\n\x04YEAR\x10\x06*\x7f\n\x18\x43oncurrencyLimitStrategy\x12\x16\n\x12\x43\x41NCEL_IN_PROGRESS\x10\x00\x12\x0f\n\x0b\x44ROP_NEWEST\x10\x01\x12\x10\n\x0cQUEUE_NEWEST\x10\x02\x12\x15\n\x11GROUP_ROUND_ROBIN\x10\x03\x12\x11\n\rCANCEL_NEWEST\x10\x04*\x85\x01\n\x15WorkerLabelComparator\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01\x12\x10\n\x0cGREATER_THAN\x10\x02\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x05\x32\xb7\x02\n\x0c\x41\x64minService\x12R\n\x0bPutWorkflow\x12 .v1.CreateWorkflowVersionRequest\x1a!.v1.CreateWorkflowVersionResponse\x12>\n\x0b\x43\x61ncelTasks\x12\x16.v1.CancelTasksRequest\x1a\x17.v1.CancelTasksResponse\x12>\n\x0bReplayTasks\x12\x16.v1.ReplayTasksRequest\x1a\x17.v1.ReplayTasksResponse\x12S\n\x12TriggerWorkflowRun\x12\x1d.v1.TriggerWorkflowRunRequest\x1a\x1e.v1.TriggerWorkflowRunResponseBBZ@github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1b\x06proto3')
|
|
20
20
|
|
|
21
21
|
_globals = globals()
|
|
22
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -26,14 +26,14 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
26
26
|
_globals['DESCRIPTOR']._serialized_options = b'Z@github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1'
|
|
27
27
|
_globals['_CREATETASKOPTS_WORKERLABELSENTRY']._loaded_options = None
|
|
28
28
|
_globals['_CREATETASKOPTS_WORKERLABELSENTRY']._serialized_options = b'8\001'
|
|
29
|
-
_globals['_STICKYSTRATEGY']._serialized_start=
|
|
30
|
-
_globals['_STICKYSTRATEGY']._serialized_end=
|
|
31
|
-
_globals['_RATELIMITDURATION']._serialized_start=
|
|
32
|
-
_globals['_RATELIMITDURATION']._serialized_end=
|
|
33
|
-
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_start=
|
|
34
|
-
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_end=
|
|
35
|
-
_globals['_WORKERLABELCOMPARATOR']._serialized_start=
|
|
36
|
-
_globals['_WORKERLABELCOMPARATOR']._serialized_end=
|
|
29
|
+
_globals['_STICKYSTRATEGY']._serialized_start=2463
|
|
30
|
+
_globals['_STICKYSTRATEGY']._serialized_end=2499
|
|
31
|
+
_globals['_RATELIMITDURATION']._serialized_start=2501
|
|
32
|
+
_globals['_RATELIMITDURATION']._serialized_end=2594
|
|
33
|
+
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_start=2596
|
|
34
|
+
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_end=2723
|
|
35
|
+
_globals['_WORKERLABELCOMPARATOR']._serialized_start=2726
|
|
36
|
+
_globals['_WORKERLABELCOMPARATOR']._serialized_end=2859
|
|
37
37
|
_globals['_CANCELTASKSREQUEST']._serialized_start=86
|
|
38
38
|
_globals['_CANCELTASKSREQUEST']._serialized_end=176
|
|
39
39
|
_globals['_REPLAYTASKSREQUEST']._serialized_start=178
|
|
@@ -49,19 +49,19 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
49
49
|
_globals['_TRIGGERWORKFLOWRUNRESPONSE']._serialized_start=684
|
|
50
50
|
_globals['_TRIGGERWORKFLOWRUNRESPONSE']._serialized_end=733
|
|
51
51
|
_globals['_CREATEWORKFLOWVERSIONREQUEST']._serialized_start=736
|
|
52
|
-
_globals['_CREATEWORKFLOWVERSIONREQUEST']._serialized_end=
|
|
53
|
-
_globals['_CONCURRENCY']._serialized_start=
|
|
54
|
-
_globals['_CONCURRENCY']._serialized_end=
|
|
55
|
-
_globals['_DESIREDWORKERLABELS']._serialized_start=
|
|
56
|
-
_globals['_DESIREDWORKERLABELS']._serialized_end=
|
|
57
|
-
_globals['_CREATETASKOPTS']._serialized_start=
|
|
58
|
-
_globals['_CREATETASKOPTS']._serialized_end=
|
|
59
|
-
_globals['_CREATETASKOPTS_WORKERLABELSENTRY']._serialized_start=
|
|
60
|
-
_globals['_CREATETASKOPTS_WORKERLABELSENTRY']._serialized_end=
|
|
61
|
-
_globals['_CREATETASKRATELIMIT']._serialized_start=
|
|
62
|
-
_globals['_CREATETASKRATELIMIT']._serialized_end=
|
|
63
|
-
_globals['_CREATEWORKFLOWVERSIONRESPONSE']._serialized_start=
|
|
64
|
-
_globals['_CREATEWORKFLOWVERSIONRESPONSE']._serialized_end=
|
|
65
|
-
_globals['_ADMINSERVICE']._serialized_start=
|
|
66
|
-
_globals['_ADMINSERVICE']._serialized_end=
|
|
52
|
+
_globals['_CREATEWORKFLOWVERSIONREQUEST']._serialized_end=1194
|
|
53
|
+
_globals['_CONCURRENCY']._serialized_start=1197
|
|
54
|
+
_globals['_CONCURRENCY']._serialized_end=1344
|
|
55
|
+
_globals['_DESIREDWORKERLABELS']._serialized_start=1347
|
|
56
|
+
_globals['_DESIREDWORKERLABELS']._serialized_end=1575
|
|
57
|
+
_globals['_CREATETASKOPTS']._serialized_start=1578
|
|
58
|
+
_globals['_CREATETASKOPTS']._serialized_end=2139
|
|
59
|
+
_globals['_CREATETASKOPTS_WORKERLABELSENTRY']._serialized_start=1984
|
|
60
|
+
_globals['_CREATETASKOPTS_WORKERLABELSENTRY']._serialized_end=2060
|
|
61
|
+
_globals['_CREATETASKRATELIMIT']._serialized_start=2142
|
|
62
|
+
_globals['_CREATETASKRATELIMIT']._serialized_end=2395
|
|
63
|
+
_globals['_CREATEWORKFLOWVERSIONRESPONSE']._serialized_start=2397
|
|
64
|
+
_globals['_CREATEWORKFLOWVERSIONRESPONSE']._serialized_end=2461
|
|
65
|
+
_globals['_ADMINSERVICE']._serialized_start=2862
|
|
66
|
+
_globals['_ADMINSERVICE']._serialized_end=3173
|
|
67
67
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -121,7 +121,7 @@ class TriggerWorkflowRunResponse(_message.Message):
|
|
|
121
121
|
def __init__(self, external_id: _Optional[str] = ...) -> None: ...
|
|
122
122
|
|
|
123
123
|
class CreateWorkflowVersionRequest(_message.Message):
|
|
124
|
-
__slots__ = ("name", "description", "version", "event_triggers", "cron_triggers", "tasks", "concurrency", "cron_input", "on_failure_task", "sticky", "default_priority")
|
|
124
|
+
__slots__ = ("name", "description", "version", "event_triggers", "cron_triggers", "tasks", "concurrency", "cron_input", "on_failure_task", "sticky", "default_priority", "concurrency_arr")
|
|
125
125
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
126
126
|
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
127
127
|
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -133,6 +133,7 @@ class CreateWorkflowVersionRequest(_message.Message):
|
|
|
133
133
|
ON_FAILURE_TASK_FIELD_NUMBER: _ClassVar[int]
|
|
134
134
|
STICKY_FIELD_NUMBER: _ClassVar[int]
|
|
135
135
|
DEFAULT_PRIORITY_FIELD_NUMBER: _ClassVar[int]
|
|
136
|
+
CONCURRENCY_ARR_FIELD_NUMBER: _ClassVar[int]
|
|
136
137
|
name: str
|
|
137
138
|
description: str
|
|
138
139
|
version: str
|
|
@@ -144,7 +145,8 @@ class CreateWorkflowVersionRequest(_message.Message):
|
|
|
144
145
|
on_failure_task: CreateTaskOpts
|
|
145
146
|
sticky: StickyStrategy
|
|
146
147
|
default_priority: int
|
|
147
|
-
|
|
148
|
+
concurrency_arr: _containers.RepeatedCompositeFieldContainer[Concurrency]
|
|
149
|
+
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., version: _Optional[str] = ..., event_triggers: _Optional[_Iterable[str]] = ..., cron_triggers: _Optional[_Iterable[str]] = ..., tasks: _Optional[_Iterable[_Union[CreateTaskOpts, _Mapping]]] = ..., concurrency: _Optional[_Union[Concurrency, _Mapping]] = ..., cron_input: _Optional[str] = ..., on_failure_task: _Optional[_Union[CreateTaskOpts, _Mapping]] = ..., sticky: _Optional[_Union[StickyStrategy, str]] = ..., default_priority: _Optional[int] = ..., concurrency_arr: _Optional[_Iterable[_Union[Concurrency, _Mapping]]] = ...) -> None: ...
|
|
148
150
|
|
|
149
151
|
class Concurrency(_message.Message):
|
|
150
152
|
__slots__ = ("expression", "max_runs", "limit_strategy")
|
|
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|
|
15
15
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fworkflows.proto\x1a\x1fgoogle/protobuf/timestamp.proto\">\n\x12PutWorkflowRequest\x12(\n\x04opts\x18\x01 \x01(\x0b\x32\x1a.CreateWorkflowVersionOpts\"\xbf\x04\n\x19\x43reateWorkflowVersionOpts\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x16\n\x0e\x65vent_triggers\x18\x04 \x03(\t\x12\x15\n\rcron_triggers\x18\x05 \x03(\t\x12\x36\n\x12scheduled_triggers\x18\x06 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x04jobs\x18\x07 \x03(\x0b\x32\x16.CreateWorkflowJobOpts\x12-\n\x0b\x63oncurrency\x18\x08 \x01(\x0b\x32\x18.WorkflowConcurrencyOpts\x12\x1d\n\x10schedule_timeout\x18\t \x01(\tH\x00\x88\x01\x01\x12\x17\n\ncron_input\x18\n \x01(\tH\x01\x88\x01\x01\x12\x33\n\x0eon_failure_job\x18\x0b \x01(\x0b\x32\x16.CreateWorkflowJobOptsH\x02\x88\x01\x01\x12$\n\x06sticky\x18\x0c \x01(\x0e\x32\x0f.StickyStrategyH\x03\x88\x01\x01\x12 \n\x04kind\x18\r \x01(\x0e\x32\r.WorkflowKindH\x04\x88\x01\x01\x12\x1d\n\x10\x64\x65\x66\x61ult_priority\x18\x0e \x01(\x05H\x05\x88\x01\x01\x42\x13\n\x11_schedule_timeoutB\r\n\x0b_cron_inputB\x11\n\x0f_on_failure_jobB\t\n\x07_stickyB\x07\n\x05_kindB\x13\n\x11_default_priority\"\xd0\x01\n\x17WorkflowConcurrencyOpts\x12\x13\n\x06\x61\x63tion\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08max_runs\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x36\n\x0elimit_strategy\x18\x03 \x01(\x0e\x32\x19.ConcurrencyLimitStrategyH\x02\x88\x01\x01\x12\x17\n\nexpression\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\t\n\x07_actionB\x0b\n\t_max_runsB\x11\n\x0f_limit_strategyB\r\n\x0b_expression\"h\n\x15\x43reateWorkflowJobOpts\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12&\n\x05steps\x18\x04 \x03(\x0b\x32\x17.CreateWorkflowStepOptsJ\x04\x08\x03\x10\x04\"\xe1\x01\n\x13\x44\x65siredWorkerLabels\x12\x15\n\x08strValue\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08intValue\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x15\n\x08required\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12/\n\ncomparator\x18\x04 \x01(\x0e\x32\x16.WorkerLabelComparatorH\x03\x88\x01\x01\x12\x13\n\x06weight\x18\x05 \x01(\x05H\x04\x88\x01\x01\x42\x0b\n\t_strValueB\x0b\n\t_intValueB\x0b\n\t_requiredB\r\n\x0b_comparatorB\t\n\x07_weight\"\xb5\x03\n\x16\x43reateWorkflowStepOpts\x12\x13\n\x0breadable_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x02 \x01(\t\x12\x0f\n\x07timeout\x18\x03 \x01(\t\x12\x0e\n\x06inputs\x18\x04 \x01(\t\x12\x0f\n\x07parents\x18\x05 \x03(\t\x12\x11\n\tuser_data\x18\x06 \x01(\t\x12\x0f\n\x07retries\x18\x07 \x01(\x05\x12)\n\x0brate_limits\x18\x08 \x03(\x0b\x32\x14.CreateStepRateLimit\x12@\n\rworker_labels\x18\t \x03(\x0b\x32).CreateWorkflowStepOpts.WorkerLabelsEntry\x12\x1b\n\x0e\x62\x61\x63koff_factor\x18\n \x01(\x02H\x00\x88\x01\x01\x12 \n\x13\x62\x61\x63koff_max_seconds\x18\x0b \x01(\x05H\x01\x88\x01\x01\x1aI\n\x11WorkerLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.DesiredWorkerLabels:\x02\x38\x01\x42\x11\n\x0f_backoff_factorB\x16\n\x14_backoff_max_seconds\"\xfa\x01\n\x13\x43reateStepRateLimit\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\x05units\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08key_expr\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nunits_expr\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11limit_values_expr\x18\x05 \x01(\tH\x03\x88\x01\x01\x12)\n\x08\x64uration\x18\x06 \x01(\x0e\x32\x12.RateLimitDurationH\x04\x88\x01\x01\x42\x08\n\x06_unitsB\x0b\n\t_key_exprB\r\n\x0b_units_exprB\x14\n\x12_limit_values_exprB\x0b\n\t_duration\"\x16\n\x14ListWorkflowsRequest\"\
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fworkflows.proto\x1a\x1fgoogle/protobuf/timestamp.proto\">\n\x12PutWorkflowRequest\x12(\n\x04opts\x18\x01 \x01(\x0b\x32\x1a.CreateWorkflowVersionOpts\"\xbf\x04\n\x19\x43reateWorkflowVersionOpts\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x16\n\x0e\x65vent_triggers\x18\x04 \x03(\t\x12\x15\n\rcron_triggers\x18\x05 \x03(\t\x12\x36\n\x12scheduled_triggers\x18\x06 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x04jobs\x18\x07 \x03(\x0b\x32\x16.CreateWorkflowJobOpts\x12-\n\x0b\x63oncurrency\x18\x08 \x01(\x0b\x32\x18.WorkflowConcurrencyOpts\x12\x1d\n\x10schedule_timeout\x18\t \x01(\tH\x00\x88\x01\x01\x12\x17\n\ncron_input\x18\n \x01(\tH\x01\x88\x01\x01\x12\x33\n\x0eon_failure_job\x18\x0b \x01(\x0b\x32\x16.CreateWorkflowJobOptsH\x02\x88\x01\x01\x12$\n\x06sticky\x18\x0c \x01(\x0e\x32\x0f.StickyStrategyH\x03\x88\x01\x01\x12 \n\x04kind\x18\r \x01(\x0e\x32\r.WorkflowKindH\x04\x88\x01\x01\x12\x1d\n\x10\x64\x65\x66\x61ult_priority\x18\x0e \x01(\x05H\x05\x88\x01\x01\x42\x13\n\x11_schedule_timeoutB\r\n\x0b_cron_inputB\x11\n\x0f_on_failure_jobB\t\n\x07_stickyB\x07\n\x05_kindB\x13\n\x11_default_priority\"\xd0\x01\n\x17WorkflowConcurrencyOpts\x12\x13\n\x06\x61\x63tion\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08max_runs\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x36\n\x0elimit_strategy\x18\x03 \x01(\x0e\x32\x19.ConcurrencyLimitStrategyH\x02\x88\x01\x01\x12\x17\n\nexpression\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\t\n\x07_actionB\x0b\n\t_max_runsB\x11\n\x0f_limit_strategyB\r\n\x0b_expression\"h\n\x15\x43reateWorkflowJobOpts\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12&\n\x05steps\x18\x04 \x03(\x0b\x32\x17.CreateWorkflowStepOptsJ\x04\x08\x03\x10\x04\"\xe1\x01\n\x13\x44\x65siredWorkerLabels\x12\x15\n\x08strValue\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08intValue\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x15\n\x08required\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12/\n\ncomparator\x18\x04 \x01(\x0e\x32\x16.WorkerLabelComparatorH\x03\x88\x01\x01\x12\x13\n\x06weight\x18\x05 \x01(\x05H\x04\x88\x01\x01\x42\x0b\n\t_strValueB\x0b\n\t_intValueB\x0b\n\t_requiredB\r\n\x0b_comparatorB\t\n\x07_weight\"\xb5\x03\n\x16\x43reateWorkflowStepOpts\x12\x13\n\x0breadable_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x02 \x01(\t\x12\x0f\n\x07timeout\x18\x03 \x01(\t\x12\x0e\n\x06inputs\x18\x04 \x01(\t\x12\x0f\n\x07parents\x18\x05 \x03(\t\x12\x11\n\tuser_data\x18\x06 \x01(\t\x12\x0f\n\x07retries\x18\x07 \x01(\x05\x12)\n\x0brate_limits\x18\x08 \x03(\x0b\x32\x14.CreateStepRateLimit\x12@\n\rworker_labels\x18\t \x03(\x0b\x32).CreateWorkflowStepOpts.WorkerLabelsEntry\x12\x1b\n\x0e\x62\x61\x63koff_factor\x18\n \x01(\x02H\x00\x88\x01\x01\x12 \n\x13\x62\x61\x63koff_max_seconds\x18\x0b \x01(\x05H\x01\x88\x01\x01\x1aI\n\x11WorkerLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.DesiredWorkerLabels:\x02\x38\x01\x42\x11\n\x0f_backoff_factorB\x16\n\x14_backoff_max_seconds\"\xfa\x01\n\x13\x43reateStepRateLimit\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\x05units\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08key_expr\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nunits_expr\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11limit_values_expr\x18\x05 \x01(\tH\x03\x88\x01\x01\x12)\n\x08\x64uration\x18\x06 \x01(\x0e\x32\x12.RateLimitDurationH\x04\x88\x01\x01\x42\x08\n\x06_unitsB\x0b\n\t_key_exprB\r\n\x0b_units_exprB\x14\n\x12_limit_values_exprB\x0b\n\t_duration\"\x16\n\x14ListWorkflowsRequest\"\xf1\x02\n\x17ScheduleWorkflowRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\tschedules\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05input\x18\x03 \x01(\t\x12\x16\n\tparent_id\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12parent_step_run_id\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63hild_index\x18\x06 \x01(\x05H\x02\x88\x01\x01\x12\x16\n\tchild_key\x18\x07 \x01(\tH\x03\x88\x01\x01\x12 \n\x13\x61\x64\x64itional_metadata\x18\x08 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08priority\x18\t \x01(\x05H\x05\x88\x01\x01\x42\x0c\n\n_parent_idB\x15\n\x13_parent_step_run_idB\x0e\n\x0c_child_indexB\x0c\n\n_child_keyB\x16\n\x14_additional_metadataB\x0b\n\t_priority\"O\n\x11ScheduledWorkflow\x12\n\n\x02id\x18\x01 \x01(\t\x12.\n\ntrigger_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe3\x01\n\x0fWorkflowVersion\x12\n\n\x02id\x18\x01 \x01(\t\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x05 \x01(\t\x12\r\n\x05order\x18\x06 \x01(\x03\x12\x13\n\x0bworkflow_id\x18\x07 \x01(\t\x12/\n\x13scheduled_workflows\x18\x08 \x03(\x0b\x32\x12.ScheduledWorkflow\"?\n\x17WorkflowTriggerEventRef\x12\x11\n\tparent_id\x18\x01 \x01(\t\x12\x11\n\tevent_key\x18\x02 \x01(\t\"9\n\x16WorkflowTriggerCronRef\x12\x11\n\tparent_id\x18\x01 \x01(\t\x12\x0c\n\x04\x63ron\x18\x02 \x01(\t\"H\n\x1a\x42ulkTriggerWorkflowRequest\x12*\n\tworkflows\x18\x01 \x03(\x0b\x32\x17.TriggerWorkflowRequest\"7\n\x1b\x42ulkTriggerWorkflowResponse\x12\x18\n\x10workflow_run_ids\x18\x01 \x03(\t\"\xf7\x02\n\x16TriggerWorkflowRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05input\x18\x02 \x01(\t\x12\x16\n\tparent_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12parent_step_run_id\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63hild_index\x18\x05 \x01(\x05H\x02\x88\x01\x01\x12\x16\n\tchild_key\x18\x06 \x01(\tH\x03\x88\x01\x01\x12 \n\x13\x61\x64\x64itional_metadata\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x1e\n\x11\x64\x65sired_worker_id\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\x08priority\x18\t \x01(\x05H\x06\x88\x01\x01\x42\x0c\n\n_parent_idB\x15\n\x13_parent_step_run_idB\x0e\n\x0c_child_indexB\x0c\n\n_child_keyB\x16\n\x14_additional_metadataB\x14\n\x12_desired_worker_idB\x0b\n\t_priority\"2\n\x17TriggerWorkflowResponse\x12\x17\n\x0fworkflow_run_id\x18\x01 \x01(\t\"W\n\x13PutRateLimitRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x05\x12$\n\x08\x64uration\x18\x03 \x01(\x0e\x32\x12.RateLimitDuration\"\x16\n\x14PutRateLimitResponse*$\n\x0eStickyStrategy\x12\x08\n\x04SOFT\x10\x00\x12\x08\n\x04HARD\x10\x01*2\n\x0cWorkflowKind\x12\x0c\n\x08\x46UNCTION\x10\x00\x12\x0b\n\x07\x44URABLE\x10\x01\x12\x07\n\x03\x44\x41G\x10\x02*\x7f\n\x18\x43oncurrencyLimitStrategy\x12\x16\n\x12\x43\x41NCEL_IN_PROGRESS\x10\x00\x12\x0f\n\x0b\x44ROP_NEWEST\x10\x01\x12\x10\n\x0cQUEUE_NEWEST\x10\x02\x12\x15\n\x11GROUP_ROUND_ROBIN\x10\x03\x12\x11\n\rCANCEL_NEWEST\x10\x04*\x85\x01\n\x15WorkerLabelComparator\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01\x12\x10\n\x0cGREATER_THAN\x10\x02\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x05*]\n\x11RateLimitDuration\x12\n\n\x06SECOND\x10\x00\x12\n\n\x06MINUTE\x10\x01\x12\x08\n\x04HOUR\x10\x02\x12\x07\n\x03\x44\x41Y\x10\x03\x12\x08\n\x04WEEK\x10\x04\x12\t\n\x05MONTH\x10\x05\x12\x08\n\x04YEAR\x10\x06\x32\xdc\x02\n\x0fWorkflowService\x12\x34\n\x0bPutWorkflow\x12\x13.PutWorkflowRequest\x1a\x10.WorkflowVersion\x12>\n\x10ScheduleWorkflow\x12\x18.ScheduleWorkflowRequest\x1a\x10.WorkflowVersion\x12\x44\n\x0fTriggerWorkflow\x12\x17.TriggerWorkflowRequest\x1a\x18.TriggerWorkflowResponse\x12P\n\x13\x42ulkTriggerWorkflow\x12\x1b.BulkTriggerWorkflowRequest\x1a\x1c.BulkTriggerWorkflowResponse\x12;\n\x0cPutRateLimit\x12\x14.PutRateLimitRequest\x1a\x15.PutRateLimitResponseBBZ@github.com/hatchet-dev/hatchet/internal/services/admin/contractsb\x06proto3')
|
|
19
19
|
|
|
20
20
|
_globals = globals()
|
|
21
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -25,16 +25,16 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
25
25
|
_globals['DESCRIPTOR']._serialized_options = b'Z@github.com/hatchet-dev/hatchet/internal/services/admin/contracts'
|
|
26
26
|
_globals['_CREATEWORKFLOWSTEPOPTS_WORKERLABELSENTRY']._loaded_options = None
|
|
27
27
|
_globals['_CREATEWORKFLOWSTEPOPTS_WORKERLABELSENTRY']._serialized_options = b'8\001'
|
|
28
|
-
_globals['_STICKYSTRATEGY']._serialized_start=
|
|
29
|
-
_globals['_STICKYSTRATEGY']._serialized_end=
|
|
30
|
-
_globals['_WORKFLOWKIND']._serialized_start=
|
|
31
|
-
_globals['_WORKFLOWKIND']._serialized_end=
|
|
32
|
-
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_start=
|
|
33
|
-
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_end=
|
|
34
|
-
_globals['_WORKERLABELCOMPARATOR']._serialized_start=
|
|
35
|
-
_globals['_WORKERLABELCOMPARATOR']._serialized_end=
|
|
36
|
-
_globals['_RATELIMITDURATION']._serialized_start=
|
|
37
|
-
_globals['_RATELIMITDURATION']._serialized_end=
|
|
28
|
+
_globals['_STICKYSTRATEGY']._serialized_start=3437
|
|
29
|
+
_globals['_STICKYSTRATEGY']._serialized_end=3473
|
|
30
|
+
_globals['_WORKFLOWKIND']._serialized_start=3475
|
|
31
|
+
_globals['_WORKFLOWKIND']._serialized_end=3525
|
|
32
|
+
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_start=3527
|
|
33
|
+
_globals['_CONCURRENCYLIMITSTRATEGY']._serialized_end=3654
|
|
34
|
+
_globals['_WORKERLABELCOMPARATOR']._serialized_start=3657
|
|
35
|
+
_globals['_WORKERLABELCOMPARATOR']._serialized_end=3790
|
|
36
|
+
_globals['_RATELIMITDURATION']._serialized_start=3792
|
|
37
|
+
_globals['_RATELIMITDURATION']._serialized_end=3885
|
|
38
38
|
_globals['_PUTWORKFLOWREQUEST']._serialized_start=52
|
|
39
39
|
_globals['_PUTWORKFLOWREQUEST']._serialized_end=114
|
|
40
40
|
_globals['_CREATEWORKFLOWVERSIONOPTS']._serialized_start=117
|
|
@@ -54,27 +54,27 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
54
54
|
_globals['_LISTWORKFLOWSREQUEST']._serialized_start=1932
|
|
55
55
|
_globals['_LISTWORKFLOWSREQUEST']._serialized_end=1954
|
|
56
56
|
_globals['_SCHEDULEWORKFLOWREQUEST']._serialized_start=1957
|
|
57
|
-
_globals['_SCHEDULEWORKFLOWREQUEST']._serialized_end=
|
|
58
|
-
_globals['_SCHEDULEDWORKFLOW']._serialized_start=
|
|
59
|
-
_globals['_SCHEDULEDWORKFLOW']._serialized_end=
|
|
60
|
-
_globals['_WORKFLOWVERSION']._serialized_start=
|
|
61
|
-
_globals['_WORKFLOWVERSION']._serialized_end=
|
|
62
|
-
_globals['_WORKFLOWTRIGGEREVENTREF']._serialized_start=
|
|
63
|
-
_globals['_WORKFLOWTRIGGEREVENTREF']._serialized_end=
|
|
64
|
-
_globals['_WORKFLOWTRIGGERCRONREF']._serialized_start=
|
|
65
|
-
_globals['_WORKFLOWTRIGGERCRONREF']._serialized_end=
|
|
66
|
-
_globals['_BULKTRIGGERWORKFLOWREQUEST']._serialized_start=
|
|
67
|
-
_globals['_BULKTRIGGERWORKFLOWREQUEST']._serialized_end=
|
|
68
|
-
_globals['_BULKTRIGGERWORKFLOWRESPONSE']._serialized_start=
|
|
69
|
-
_globals['_BULKTRIGGERWORKFLOWRESPONSE']._serialized_end=
|
|
70
|
-
_globals['_TRIGGERWORKFLOWREQUEST']._serialized_start=
|
|
71
|
-
_globals['_TRIGGERWORKFLOWREQUEST']._serialized_end=
|
|
72
|
-
_globals['_TRIGGERWORKFLOWRESPONSE']._serialized_start=
|
|
73
|
-
_globals['_TRIGGERWORKFLOWRESPONSE']._serialized_end=
|
|
74
|
-
_globals['_PUTRATELIMITREQUEST']._serialized_start=
|
|
75
|
-
_globals['_PUTRATELIMITREQUEST']._serialized_end=
|
|
76
|
-
_globals['_PUTRATELIMITRESPONSE']._serialized_start=
|
|
77
|
-
_globals['_PUTRATELIMITRESPONSE']._serialized_end=
|
|
78
|
-
_globals['_WORKFLOWSERVICE']._serialized_start=
|
|
79
|
-
_globals['_WORKFLOWSERVICE']._serialized_end=
|
|
57
|
+
_globals['_SCHEDULEWORKFLOWREQUEST']._serialized_end=2326
|
|
58
|
+
_globals['_SCHEDULEDWORKFLOW']._serialized_start=2328
|
|
59
|
+
_globals['_SCHEDULEDWORKFLOW']._serialized_end=2407
|
|
60
|
+
_globals['_WORKFLOWVERSION']._serialized_start=2410
|
|
61
|
+
_globals['_WORKFLOWVERSION']._serialized_end=2637
|
|
62
|
+
_globals['_WORKFLOWTRIGGEREVENTREF']._serialized_start=2639
|
|
63
|
+
_globals['_WORKFLOWTRIGGEREVENTREF']._serialized_end=2702
|
|
64
|
+
_globals['_WORKFLOWTRIGGERCRONREF']._serialized_start=2704
|
|
65
|
+
_globals['_WORKFLOWTRIGGERCRONREF']._serialized_end=2761
|
|
66
|
+
_globals['_BULKTRIGGERWORKFLOWREQUEST']._serialized_start=2763
|
|
67
|
+
_globals['_BULKTRIGGERWORKFLOWREQUEST']._serialized_end=2835
|
|
68
|
+
_globals['_BULKTRIGGERWORKFLOWRESPONSE']._serialized_start=2837
|
|
69
|
+
_globals['_BULKTRIGGERWORKFLOWRESPONSE']._serialized_end=2892
|
|
70
|
+
_globals['_TRIGGERWORKFLOWREQUEST']._serialized_start=2895
|
|
71
|
+
_globals['_TRIGGERWORKFLOWREQUEST']._serialized_end=3270
|
|
72
|
+
_globals['_TRIGGERWORKFLOWRESPONSE']._serialized_start=3272
|
|
73
|
+
_globals['_TRIGGERWORKFLOWRESPONSE']._serialized_end=3322
|
|
74
|
+
_globals['_PUTRATELIMITREQUEST']._serialized_start=3324
|
|
75
|
+
_globals['_PUTRATELIMITREQUEST']._serialized_end=3411
|
|
76
|
+
_globals['_PUTRATELIMITRESPONSE']._serialized_start=3413
|
|
77
|
+
_globals['_PUTRATELIMITRESPONSE']._serialized_end=3435
|
|
78
|
+
_globals['_WORKFLOWSERVICE']._serialized_start=3888
|
|
79
|
+
_globals['_WORKFLOWSERVICE']._serialized_end=4236
|
|
80
80
|
# @@protoc_insertion_point(module_scope)
|
hatchet_sdk/hatchet.py
CHANGED
|
@@ -188,7 +188,7 @@ class Hatchet:
|
|
|
188
188
|
version: str | None = None,
|
|
189
189
|
sticky: StickyStrategy | None = None,
|
|
190
190
|
default_priority: int = 1,
|
|
191
|
-
concurrency: ConcurrencyExpression | None = None,
|
|
191
|
+
concurrency: ConcurrencyExpression | list[ConcurrencyExpression] | None = None,
|
|
192
192
|
task_defaults: TaskDefaults = TaskDefaults(),
|
|
193
193
|
) -> Workflow[EmptyModel]: ...
|
|
194
194
|
|
|
@@ -204,7 +204,7 @@ class Hatchet:
|
|
|
204
204
|
version: str | None = None,
|
|
205
205
|
sticky: StickyStrategy | None = None,
|
|
206
206
|
default_priority: int = 1,
|
|
207
|
-
concurrency: ConcurrencyExpression | None = None,
|
|
207
|
+
concurrency: ConcurrencyExpression | list[ConcurrencyExpression] | None = None,
|
|
208
208
|
task_defaults: TaskDefaults = TaskDefaults(),
|
|
209
209
|
) -> Workflow[TWorkflowInput]: ...
|
|
210
210
|
|
|
@@ -219,7 +219,7 @@ class Hatchet:
|
|
|
219
219
|
version: str | None = None,
|
|
220
220
|
sticky: StickyStrategy | None = None,
|
|
221
221
|
default_priority: int = 1,
|
|
222
|
-
concurrency: ConcurrencyExpression | None = None,
|
|
222
|
+
concurrency: ConcurrencyExpression | list[ConcurrencyExpression] | None = None,
|
|
223
223
|
task_defaults: TaskDefaults = TaskDefaults(),
|
|
224
224
|
) -> Workflow[EmptyModel] | Workflow[TWorkflowInput]:
|
|
225
225
|
"""
|
|
@@ -288,7 +288,7 @@ class Hatchet:
|
|
|
288
288
|
version: str | None = None,
|
|
289
289
|
sticky: StickyStrategy | None = None,
|
|
290
290
|
default_priority: int = 1,
|
|
291
|
-
concurrency: ConcurrencyExpression | None = None,
|
|
291
|
+
concurrency: ConcurrencyExpression | list[ConcurrencyExpression] | None = None,
|
|
292
292
|
schedule_timeout: Duration = DEFAULT_SCHEDULE_TIMEOUT,
|
|
293
293
|
execution_timeout: Duration = DEFAULT_EXECUTION_TIMEOUT,
|
|
294
294
|
retries: int = 0,
|
|
@@ -310,7 +310,7 @@ class Hatchet:
|
|
|
310
310
|
version: str | None = None,
|
|
311
311
|
sticky: StickyStrategy | None = None,
|
|
312
312
|
default_priority: int = 1,
|
|
313
|
-
concurrency: ConcurrencyExpression | None = None,
|
|
313
|
+
concurrency: ConcurrencyExpression | list[ConcurrencyExpression] | None = None,
|
|
314
314
|
schedule_timeout: Duration = DEFAULT_SCHEDULE_TIMEOUT,
|
|
315
315
|
execution_timeout: Duration = DEFAULT_EXECUTION_TIMEOUT,
|
|
316
316
|
retries: int = 0,
|
|
@@ -333,7 +333,7 @@ class Hatchet:
|
|
|
333
333
|
version: str | None = None,
|
|
334
334
|
sticky: StickyStrategy | None = None,
|
|
335
335
|
default_priority: int = 1,
|
|
336
|
-
concurrency: ConcurrencyExpression | None = None,
|
|
336
|
+
concurrency: ConcurrencyExpression | list[ConcurrencyExpression] | None = None,
|
|
337
337
|
schedule_timeout: Duration = DEFAULT_SCHEDULE_TIMEOUT,
|
|
338
338
|
execution_timeout: Duration = DEFAULT_EXECUTION_TIMEOUT,
|
|
339
339
|
retries: int = 0,
|
|
@@ -417,6 +417,13 @@ class Hatchet:
|
|
|
417
417
|
self,
|
|
418
418
|
)
|
|
419
419
|
|
|
420
|
+
if isinstance(concurrency, list):
|
|
421
|
+
_concurrency = concurrency
|
|
422
|
+
elif isinstance(concurrency, ConcurrencyExpression):
|
|
423
|
+
_concurrency = [concurrency]
|
|
424
|
+
else:
|
|
425
|
+
_concurrency = []
|
|
426
|
+
|
|
420
427
|
task_wrapper = workflow.task(
|
|
421
428
|
name=name,
|
|
422
429
|
schedule_timeout=schedule_timeout,
|
|
@@ -427,7 +434,7 @@ class Hatchet:
|
|
|
427
434
|
desired_worker_labels=desired_worker_labels,
|
|
428
435
|
backoff_factor=backoff_factor,
|
|
429
436
|
backoff_max_seconds=backoff_max_seconds,
|
|
430
|
-
concurrency=
|
|
437
|
+
concurrency=_concurrency,
|
|
431
438
|
)
|
|
432
439
|
|
|
433
440
|
def inner(
|
hatchet_sdk/runnables/types.py
CHANGED
|
@@ -79,21 +79,15 @@ class WorkflowConfig(BaseModel):
|
|
|
79
79
|
on_events: list[str] = Field(default_factory=list)
|
|
80
80
|
on_crons: list[str] = Field(default_factory=list)
|
|
81
81
|
sticky: StickyStrategy | None = None
|
|
82
|
-
concurrency: ConcurrencyExpression | None = None
|
|
82
|
+
concurrency: ConcurrencyExpression | list[ConcurrencyExpression] | None = None
|
|
83
83
|
input_validator: Type[BaseModel] = EmptyModel
|
|
84
84
|
default_priority: int | None = None
|
|
85
85
|
|
|
86
86
|
task_defaults: TaskDefaults = TaskDefaults()
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
def validate_concurrency_expression(self) -> "WorkflowConfig":
|
|
90
|
-
if not self.concurrency:
|
|
91
|
-
return self
|
|
92
|
-
|
|
93
|
-
expr = self.concurrency.expression
|
|
94
|
-
|
|
88
|
+
def _raise_for_invalid_expression(self, expr: str) -> None:
|
|
95
89
|
if not expr.startswith("input."):
|
|
96
|
-
return
|
|
90
|
+
return None
|
|
97
91
|
|
|
98
92
|
_, field = expr.split(".", maxsplit=2)
|
|
99
93
|
|
|
@@ -102,6 +96,18 @@ class WorkflowConfig(BaseModel):
|
|
|
102
96
|
f"The concurrency expression provided relies on the `{field}` field, which was not present in `{self.input_validator.__name__}`."
|
|
103
97
|
)
|
|
104
98
|
|
|
99
|
+
@model_validator(mode="after")
|
|
100
|
+
def validate_concurrency_expression(self) -> "WorkflowConfig":
|
|
101
|
+
if not self.concurrency:
|
|
102
|
+
return self
|
|
103
|
+
|
|
104
|
+
if isinstance(self.concurrency, list):
|
|
105
|
+
for item in self.concurrency:
|
|
106
|
+
self._raise_for_invalid_expression(item.expression)
|
|
107
|
+
|
|
108
|
+
if isinstance(self.concurrency, ConcurrencyExpression):
|
|
109
|
+
self._raise_for_invalid_expression(self.concurrency.expression)
|
|
110
|
+
|
|
105
111
|
return self
|
|
106
112
|
|
|
107
113
|
|
|
@@ -137,6 +137,16 @@ class BaseWorkflow(Generic[TWorkflowInput]):
|
|
|
137
137
|
t.to_proto(service_name) if (t := self._on_failure_task) else None
|
|
138
138
|
)
|
|
139
139
|
|
|
140
|
+
if isinstance(self.config.concurrency, list):
|
|
141
|
+
_concurrency_arr = [c.to_proto() for c in self.config.concurrency]
|
|
142
|
+
_concurrency = None
|
|
143
|
+
elif isinstance(self.config.concurrency, ConcurrencyExpression):
|
|
144
|
+
_concurrency_arr = []
|
|
145
|
+
_concurrency = self.config.concurrency.to_proto()
|
|
146
|
+
else:
|
|
147
|
+
_concurrency = None
|
|
148
|
+
_concurrency_arr = []
|
|
149
|
+
|
|
140
150
|
return CreateWorkflowVersionRequest(
|
|
141
151
|
name=name,
|
|
142
152
|
description=self.config.description,
|
|
@@ -144,11 +154,12 @@ class BaseWorkflow(Generic[TWorkflowInput]):
|
|
|
144
154
|
event_triggers=event_triggers,
|
|
145
155
|
cron_triggers=self.config.on_crons,
|
|
146
156
|
tasks=tasks,
|
|
147
|
-
concurrency=(c.to_proto() if (c := self.config.concurrency) else None),
|
|
148
157
|
## TODO: Fix this
|
|
149
158
|
cron_input=None,
|
|
150
159
|
on_failure_task=on_failure_task,
|
|
151
160
|
sticky=convert_python_enum_to_proto(self.config.sticky, StickyStrategyProto), # type: ignore[arg-type]
|
|
161
|
+
concurrency=_concurrency,
|
|
162
|
+
concurrency_arr=_concurrency_arr,
|
|
152
163
|
default_priority=self.config.default_priority,
|
|
153
164
|
)
|
|
154
165
|
|
|
@@ -235,10 +235,10 @@ hatchet_sdk/contracts/v1/dispatcher_pb2_grpc.py,sha256=alnJTOJmf9AWr5qvqX0ivqEm1
|
|
|
235
235
|
hatchet_sdk/contracts/v1/shared/condition_pb2.py,sha256=dLBp9p48xEgDIOUU3lWn9wb5HWlQShaMp-1-_OAbKZY,3194
|
|
236
236
|
hatchet_sdk/contracts/v1/shared/condition_pb2.pyi,sha256=OZrUydy3wmHIoZjUQ5wrVTEaayTQlIZhfwJ8KyS26t8,3873
|
|
237
237
|
hatchet_sdk/contracts/v1/shared/condition_pb2_grpc.py,sha256=-LQAfCTGRcj81g8ij2CUeuBDNKHTO3JojkByh3ay0QY,1136
|
|
238
|
-
hatchet_sdk/contracts/v1/workflows_pb2.py,sha256
|
|
239
|
-
hatchet_sdk/contracts/v1/workflows_pb2.pyi,sha256=
|
|
238
|
+
hatchet_sdk/contracts/v1/workflows_pb2.py,sha256=5D0OjZP58jlkDh1qr74JBFfx94tBSOmXOxfXJXz9y3E,9162
|
|
239
|
+
hatchet_sdk/contracts/v1/workflows_pb2.pyi,sha256=UQv-jSQoYR63ru4Ufu9MzF-X4gzoSPa1faYcnT6FdWA,12043
|
|
240
240
|
hatchet_sdk/contracts/v1/workflows_pb2_grpc.py,sha256=XytYpV2kJQZT8iAs14z4SWsv-90ApfoFUEc8bRb5WHk,9299
|
|
241
|
-
hatchet_sdk/contracts/workflows_pb2.py,sha256=
|
|
241
|
+
hatchet_sdk/contracts/workflows_pb2.py,sha256=daEsUwZnlDQ5GGLJ8WHgLdI1Tgr3lBXxGV1mJ6go0nE,11812
|
|
242
242
|
hatchet_sdk/contracts/workflows_pb2.pyi,sha256=WJ3b45pWvoNmmWTWjBJt61IiAoVn61F62AG5OrRsnd8,15538
|
|
243
243
|
hatchet_sdk/contracts/workflows_pb2_grpc.py,sha256=2V8E72DlJx5qlH2yiQpVCu5cQbKUba5X7T1yNrQDF_s,10819
|
|
244
244
|
hatchet_sdk/exceptions.py,sha256=HGmYSZy3bCY2rBDEOQfhYGRa7_j9GvYT9Pc0B8Ic5Ug,49
|
|
@@ -250,7 +250,7 @@ hatchet_sdk/features/runs.py,sha256=3EPihnW2jnbITiOz8DWmCK7AaYqYH_MxFMQM9FXTlh4,
|
|
|
250
250
|
hatchet_sdk/features/scheduled.py,sha256=1_GMP7jSC9UCFFWLVES5HtTGQInQd9cJeqJDhq0Hnmg,8813
|
|
251
251
|
hatchet_sdk/features/workers.py,sha256=fG8zoRXMm-lNNdNfeovKKpmJ0RzjZd6CIq_dVsu-ih0,1515
|
|
252
252
|
hatchet_sdk/features/workflows.py,sha256=x1Z_HZM_ZQZbWZhOfzJaEiPfRNSn6YX3IaTmFZ5D7MY,2069
|
|
253
|
-
hatchet_sdk/hatchet.py,sha256=
|
|
253
|
+
hatchet_sdk/hatchet.py,sha256=YcnNNiA_Q5VMD7oH3wG9RyV8GSS08B45-6-12U4VVoo,23581
|
|
254
254
|
hatchet_sdk/labels.py,sha256=nATgxWE3lFxRTnfISEpoIRLGbMfAZsHF4lZTuG4Mfic,182
|
|
255
255
|
hatchet_sdk/logger.py,sha256=5uOr52T4mImSQm1QvWT8HvZFK5WfPNh3Y1cBQZRFgUQ,333
|
|
256
256
|
hatchet_sdk/metadata.py,sha256=XkRbhnghJJGCdVvF-uzyGBcNaTqpeQ3uiQvNNP1wyBc,107
|
|
@@ -260,8 +260,8 @@ hatchet_sdk/rate_limit.py,sha256=TwbCuggiZaWpYuo4mjVLlE-z1OfQ2mRBiVvCSaG3lv4,391
|
|
|
260
260
|
hatchet_sdk/runnables/contextvars.py,sha256=6MDocAMmlyiRW37oQ1jyx10tAlJs-xgDjR3xPoPz05g,426
|
|
261
261
|
hatchet_sdk/runnables/standalone.py,sha256=KyKA3UeuyU_IK0t-c0Q56Lm-W4rewILkfHlenjos474,6276
|
|
262
262
|
hatchet_sdk/runnables/task.py,sha256=nZPclBbNaYRMlCLOYi91YU503MiTcGSp92Unh3_nKvs,7533
|
|
263
|
-
hatchet_sdk/runnables/types.py,sha256=
|
|
264
|
-
hatchet_sdk/runnables/workflow.py,sha256=
|
|
263
|
+
hatchet_sdk/runnables/types.py,sha256=hF_8kcSWIVXgYspp67RwSfi-CFZJFTbb8mL8BHR8tG8,4889
|
|
264
|
+
hatchet_sdk/runnables/workflow.py,sha256=PvQeDglpyGhJdgOTqjRmIOHKmEhtmRcF3DWZqbr7EE8,28381
|
|
265
265
|
hatchet_sdk/token.py,sha256=KjIiInwG5Kqd_FO4BSW1x_5Uc7PFbnzIVJqr50-ZldE,779
|
|
266
266
|
hatchet_sdk/utils/backoff.py,sha256=6B5Rb5nLKw_TqqgpJMYjIBV1PTTtbOMRZCveisVhg_I,353
|
|
267
267
|
hatchet_sdk/utils/proto_enums.py,sha256=0UybwE3s7TcqmzoQSO8YnhgAKOS8WZXsyPchB8-eksw,1247
|
|
@@ -506,7 +506,7 @@ hatchet_sdk/worker/runner/runner.py,sha256=J-gTpoYF9WphB1zZhpPJryCv10VjU-MiCdJgM
|
|
|
506
506
|
hatchet_sdk/worker/runner/utils/capture_logs.py,sha256=nHRPSiDBqzhObM7i2X7t03OupVFnE7kQBdR2Ckgg-2w,2709
|
|
507
507
|
hatchet_sdk/worker/worker.py,sha256=m11u3QPyAqXJpF6Y3lTUEVqTKdIigGKTXTymNPqq6hw,16149
|
|
508
508
|
hatchet_sdk/workflow_run.py,sha256=ZwH0HLFGFVXz6jbiqSv4w0Om2XuR52Tzzw6LH4y65jQ,2765
|
|
509
|
-
hatchet_sdk-1.
|
|
510
|
-
hatchet_sdk-1.
|
|
511
|
-
hatchet_sdk-1.
|
|
512
|
-
hatchet_sdk-1.
|
|
509
|
+
hatchet_sdk-1.6.0.dist-info/METADATA,sha256=35x1jq242_MEnKz9_8o7MiS9yA49QZe-O4qpZo1zHVc,3635
|
|
510
|
+
hatchet_sdk-1.6.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
511
|
+
hatchet_sdk-1.6.0.dist-info/entry_points.txt,sha256=uYc-ivF7fUATjrWnwHP32ojgMCmogIs6yFOU8lEA4mk,1276
|
|
512
|
+
hatchet_sdk-1.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|