hatchet-sdk 1.13.0__py3-none-any.whl → 1.14.1__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/__init__.py +16 -8
- hatchet_sdk/clients/listeners/durable_event_listener.py +2 -2
- hatchet_sdk/clients/rest/models/semaphore_slots.py +1 -1
- hatchet_sdk/clients/rest/models/v1_task_summary.py +5 -0
- hatchet_sdk/clients/rest/models/v1_workflow_run_details.py +11 -1
- hatchet_sdk/clients/rest/models/workflow_version.py +5 -0
- hatchet_sdk/{waits.py → conditions.py} +15 -0
- hatchet_sdk/context/context.py +10 -3
- hatchet_sdk/exceptions.py +4 -0
- hatchet_sdk/features/filters.py +9 -18
- hatchet_sdk/runnables/task.py +12 -27
- hatchet_sdk/runnables/workflow.py +1 -1
- hatchet_sdk/v0/__init__.py +7 -7
- hatchet_sdk/v0/clients/admin.py +7 -7
- hatchet_sdk/v0/clients/dispatcher/action_listener.py +8 -8
- hatchet_sdk/v0/clients/dispatcher/dispatcher.py +9 -9
- hatchet_sdk/v0/clients/events.py +3 -3
- hatchet_sdk/v0/clients/rest/tenacity_utils.py +1 -1
- hatchet_sdk/v0/clients/run_event_listener.py +3 -3
- hatchet_sdk/v0/clients/workflow_listener.py +5 -5
- hatchet_sdk/v0/context/context.py +6 -6
- hatchet_sdk/v0/hatchet.py +4 -4
- hatchet_sdk/v0/opentelemetry/instrumentor.py +1 -1
- hatchet_sdk/v0/rate_limit.py +1 -1
- hatchet_sdk/v0/v2/callable.py +4 -4
- hatchet_sdk/v0/v2/concurrency.py +2 -2
- hatchet_sdk/v0/v2/hatchet.py +3 -3
- hatchet_sdk/v0/worker/action_listener_process.py +6 -6
- hatchet_sdk/v0/worker/runner/run_loop_manager.py +1 -1
- hatchet_sdk/v0/worker/runner/runner.py +10 -10
- hatchet_sdk/v0/worker/runner/utils/capture_logs.py +1 -1
- hatchet_sdk/v0/worker/worker.py +2 -2
- hatchet_sdk/v0/workflow.py +3 -3
- hatchet_sdk/worker/runner/runner.py +69 -17
- hatchet_sdk/worker/worker.py +1 -1
- {hatchet_sdk-1.13.0.dist-info → hatchet_sdk-1.14.1.dist-info}/METADATA +1 -1
- {hatchet_sdk-1.13.0.dist-info → hatchet_sdk-1.14.1.dist-info}/RECORD +39 -49
- hatchet_sdk/v0/contracts/dispatcher_pb2.py +0 -102
- hatchet_sdk/v0/contracts/dispatcher_pb2.pyi +0 -387
- hatchet_sdk/v0/contracts/dispatcher_pb2_grpc.py +0 -621
- hatchet_sdk/v0/contracts/events_pb2.py +0 -46
- hatchet_sdk/v0/contracts/events_pb2.pyi +0 -87
- hatchet_sdk/v0/contracts/events_pb2_grpc.py +0 -274
- hatchet_sdk/v0/contracts/workflows_pb2.py +0 -80
- hatchet_sdk/v0/contracts/workflows_pb2.pyi +0 -312
- hatchet_sdk/v0/contracts/workflows_pb2_grpc.py +0 -277
- hatchet_sdk/v0/logger.py +0 -13
- {hatchet_sdk-1.13.0.dist-info → hatchet_sdk-1.14.1.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.13.0.dist-info → hatchet_sdk-1.14.1.dist-info}/entry_points.txt +0 -0
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
2
|
-
from google.protobuf.internal import containers as _containers
|
|
3
|
-
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
4
|
-
from google.protobuf import descriptor as _descriptor
|
|
5
|
-
from google.protobuf import message as _message
|
|
6
|
-
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
7
|
-
|
|
8
|
-
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
-
|
|
10
|
-
class StickyStrategy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
11
|
-
__slots__ = ()
|
|
12
|
-
SOFT: _ClassVar[StickyStrategy]
|
|
13
|
-
HARD: _ClassVar[StickyStrategy]
|
|
14
|
-
|
|
15
|
-
class WorkflowKind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
16
|
-
__slots__ = ()
|
|
17
|
-
FUNCTION: _ClassVar[WorkflowKind]
|
|
18
|
-
DURABLE: _ClassVar[WorkflowKind]
|
|
19
|
-
DAG: _ClassVar[WorkflowKind]
|
|
20
|
-
|
|
21
|
-
class ConcurrencyLimitStrategy(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
22
|
-
__slots__ = ()
|
|
23
|
-
CANCEL_IN_PROGRESS: _ClassVar[ConcurrencyLimitStrategy]
|
|
24
|
-
DROP_NEWEST: _ClassVar[ConcurrencyLimitStrategy]
|
|
25
|
-
QUEUE_NEWEST: _ClassVar[ConcurrencyLimitStrategy]
|
|
26
|
-
GROUP_ROUND_ROBIN: _ClassVar[ConcurrencyLimitStrategy]
|
|
27
|
-
CANCEL_NEWEST: _ClassVar[ConcurrencyLimitStrategy]
|
|
28
|
-
|
|
29
|
-
class WorkerLabelComparator(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
30
|
-
__slots__ = ()
|
|
31
|
-
EQUAL: _ClassVar[WorkerLabelComparator]
|
|
32
|
-
NOT_EQUAL: _ClassVar[WorkerLabelComparator]
|
|
33
|
-
GREATER_THAN: _ClassVar[WorkerLabelComparator]
|
|
34
|
-
GREATER_THAN_OR_EQUAL: _ClassVar[WorkerLabelComparator]
|
|
35
|
-
LESS_THAN: _ClassVar[WorkerLabelComparator]
|
|
36
|
-
LESS_THAN_OR_EQUAL: _ClassVar[WorkerLabelComparator]
|
|
37
|
-
|
|
38
|
-
class RateLimitDuration(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
39
|
-
__slots__ = ()
|
|
40
|
-
SECOND: _ClassVar[RateLimitDuration]
|
|
41
|
-
MINUTE: _ClassVar[RateLimitDuration]
|
|
42
|
-
HOUR: _ClassVar[RateLimitDuration]
|
|
43
|
-
DAY: _ClassVar[RateLimitDuration]
|
|
44
|
-
WEEK: _ClassVar[RateLimitDuration]
|
|
45
|
-
MONTH: _ClassVar[RateLimitDuration]
|
|
46
|
-
YEAR: _ClassVar[RateLimitDuration]
|
|
47
|
-
SOFT: StickyStrategy
|
|
48
|
-
HARD: StickyStrategy
|
|
49
|
-
FUNCTION: WorkflowKind
|
|
50
|
-
DURABLE: WorkflowKind
|
|
51
|
-
DAG: WorkflowKind
|
|
52
|
-
CANCEL_IN_PROGRESS: ConcurrencyLimitStrategy
|
|
53
|
-
DROP_NEWEST: ConcurrencyLimitStrategy
|
|
54
|
-
QUEUE_NEWEST: ConcurrencyLimitStrategy
|
|
55
|
-
GROUP_ROUND_ROBIN: ConcurrencyLimitStrategy
|
|
56
|
-
CANCEL_NEWEST: ConcurrencyLimitStrategy
|
|
57
|
-
EQUAL: WorkerLabelComparator
|
|
58
|
-
NOT_EQUAL: WorkerLabelComparator
|
|
59
|
-
GREATER_THAN: WorkerLabelComparator
|
|
60
|
-
GREATER_THAN_OR_EQUAL: WorkerLabelComparator
|
|
61
|
-
LESS_THAN: WorkerLabelComparator
|
|
62
|
-
LESS_THAN_OR_EQUAL: WorkerLabelComparator
|
|
63
|
-
SECOND: RateLimitDuration
|
|
64
|
-
MINUTE: RateLimitDuration
|
|
65
|
-
HOUR: RateLimitDuration
|
|
66
|
-
DAY: RateLimitDuration
|
|
67
|
-
WEEK: RateLimitDuration
|
|
68
|
-
MONTH: RateLimitDuration
|
|
69
|
-
YEAR: RateLimitDuration
|
|
70
|
-
|
|
71
|
-
class PutWorkflowRequest(_message.Message):
|
|
72
|
-
__slots__ = ("opts",)
|
|
73
|
-
OPTS_FIELD_NUMBER: _ClassVar[int]
|
|
74
|
-
opts: CreateWorkflowVersionOpts
|
|
75
|
-
def __init__(self, opts: _Optional[_Union[CreateWorkflowVersionOpts, _Mapping]] = ...) -> None: ...
|
|
76
|
-
|
|
77
|
-
class CreateWorkflowVersionOpts(_message.Message):
|
|
78
|
-
__slots__ = ("name", "description", "version", "event_triggers", "cron_triggers", "scheduled_triggers", "jobs", "concurrency", "schedule_timeout", "cron_input", "on_failure_job", "sticky", "kind", "default_priority")
|
|
79
|
-
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
80
|
-
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
-
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
-
EVENT_TRIGGERS_FIELD_NUMBER: _ClassVar[int]
|
|
83
|
-
CRON_TRIGGERS_FIELD_NUMBER: _ClassVar[int]
|
|
84
|
-
SCHEDULED_TRIGGERS_FIELD_NUMBER: _ClassVar[int]
|
|
85
|
-
JOBS_FIELD_NUMBER: _ClassVar[int]
|
|
86
|
-
CONCURRENCY_FIELD_NUMBER: _ClassVar[int]
|
|
87
|
-
SCHEDULE_TIMEOUT_FIELD_NUMBER: _ClassVar[int]
|
|
88
|
-
CRON_INPUT_FIELD_NUMBER: _ClassVar[int]
|
|
89
|
-
ON_FAILURE_JOB_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
-
STICKY_FIELD_NUMBER: _ClassVar[int]
|
|
91
|
-
KIND_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
-
DEFAULT_PRIORITY_FIELD_NUMBER: _ClassVar[int]
|
|
93
|
-
name: str
|
|
94
|
-
description: str
|
|
95
|
-
version: str
|
|
96
|
-
event_triggers: _containers.RepeatedScalarFieldContainer[str]
|
|
97
|
-
cron_triggers: _containers.RepeatedScalarFieldContainer[str]
|
|
98
|
-
scheduled_triggers: _containers.RepeatedCompositeFieldContainer[_timestamp_pb2.Timestamp]
|
|
99
|
-
jobs: _containers.RepeatedCompositeFieldContainer[CreateWorkflowJobOpts]
|
|
100
|
-
concurrency: WorkflowConcurrencyOpts
|
|
101
|
-
schedule_timeout: str
|
|
102
|
-
cron_input: str
|
|
103
|
-
on_failure_job: CreateWorkflowJobOpts
|
|
104
|
-
sticky: StickyStrategy
|
|
105
|
-
kind: WorkflowKind
|
|
106
|
-
default_priority: int
|
|
107
|
-
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., version: _Optional[str] = ..., event_triggers: _Optional[_Iterable[str]] = ..., cron_triggers: _Optional[_Iterable[str]] = ..., scheduled_triggers: _Optional[_Iterable[_Union[_timestamp_pb2.Timestamp, _Mapping]]] = ..., jobs: _Optional[_Iterable[_Union[CreateWorkflowJobOpts, _Mapping]]] = ..., concurrency: _Optional[_Union[WorkflowConcurrencyOpts, _Mapping]] = ..., schedule_timeout: _Optional[str] = ..., cron_input: _Optional[str] = ..., on_failure_job: _Optional[_Union[CreateWorkflowJobOpts, _Mapping]] = ..., sticky: _Optional[_Union[StickyStrategy, str]] = ..., kind: _Optional[_Union[WorkflowKind, str]] = ..., default_priority: _Optional[int] = ...) -> None: ...
|
|
108
|
-
|
|
109
|
-
class WorkflowConcurrencyOpts(_message.Message):
|
|
110
|
-
__slots__ = ("action", "max_runs", "limit_strategy", "expression")
|
|
111
|
-
ACTION_FIELD_NUMBER: _ClassVar[int]
|
|
112
|
-
MAX_RUNS_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
-
LIMIT_STRATEGY_FIELD_NUMBER: _ClassVar[int]
|
|
114
|
-
EXPRESSION_FIELD_NUMBER: _ClassVar[int]
|
|
115
|
-
action: str
|
|
116
|
-
max_runs: int
|
|
117
|
-
limit_strategy: ConcurrencyLimitStrategy
|
|
118
|
-
expression: str
|
|
119
|
-
def __init__(self, action: _Optional[str] = ..., max_runs: _Optional[int] = ..., limit_strategy: _Optional[_Union[ConcurrencyLimitStrategy, str]] = ..., expression: _Optional[str] = ...) -> None: ...
|
|
120
|
-
|
|
121
|
-
class CreateWorkflowJobOpts(_message.Message):
|
|
122
|
-
__slots__ = ("name", "description", "steps")
|
|
123
|
-
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
124
|
-
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
125
|
-
STEPS_FIELD_NUMBER: _ClassVar[int]
|
|
126
|
-
name: str
|
|
127
|
-
description: str
|
|
128
|
-
steps: _containers.RepeatedCompositeFieldContainer[CreateWorkflowStepOpts]
|
|
129
|
-
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., steps: _Optional[_Iterable[_Union[CreateWorkflowStepOpts, _Mapping]]] = ...) -> None: ...
|
|
130
|
-
|
|
131
|
-
class DesiredWorkerLabels(_message.Message):
|
|
132
|
-
__slots__ = ("strValue", "intValue", "required", "comparator", "weight")
|
|
133
|
-
STRVALUE_FIELD_NUMBER: _ClassVar[int]
|
|
134
|
-
INTVALUE_FIELD_NUMBER: _ClassVar[int]
|
|
135
|
-
REQUIRED_FIELD_NUMBER: _ClassVar[int]
|
|
136
|
-
COMPARATOR_FIELD_NUMBER: _ClassVar[int]
|
|
137
|
-
WEIGHT_FIELD_NUMBER: _ClassVar[int]
|
|
138
|
-
strValue: str
|
|
139
|
-
intValue: int
|
|
140
|
-
required: bool
|
|
141
|
-
comparator: WorkerLabelComparator
|
|
142
|
-
weight: int
|
|
143
|
-
def __init__(self, strValue: _Optional[str] = ..., intValue: _Optional[int] = ..., required: bool = ..., comparator: _Optional[_Union[WorkerLabelComparator, str]] = ..., weight: _Optional[int] = ...) -> None: ...
|
|
144
|
-
|
|
145
|
-
class CreateWorkflowStepOpts(_message.Message):
|
|
146
|
-
__slots__ = ("readable_id", "action", "timeout", "inputs", "parents", "user_data", "retries", "rate_limits", "worker_labels", "backoff_factor", "backoff_max_seconds")
|
|
147
|
-
class WorkerLabelsEntry(_message.Message):
|
|
148
|
-
__slots__ = ("key", "value")
|
|
149
|
-
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
150
|
-
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
151
|
-
key: str
|
|
152
|
-
value: DesiredWorkerLabels
|
|
153
|
-
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[DesiredWorkerLabels, _Mapping]] = ...) -> None: ...
|
|
154
|
-
READABLE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
155
|
-
ACTION_FIELD_NUMBER: _ClassVar[int]
|
|
156
|
-
TIMEOUT_FIELD_NUMBER: _ClassVar[int]
|
|
157
|
-
INPUTS_FIELD_NUMBER: _ClassVar[int]
|
|
158
|
-
PARENTS_FIELD_NUMBER: _ClassVar[int]
|
|
159
|
-
USER_DATA_FIELD_NUMBER: _ClassVar[int]
|
|
160
|
-
RETRIES_FIELD_NUMBER: _ClassVar[int]
|
|
161
|
-
RATE_LIMITS_FIELD_NUMBER: _ClassVar[int]
|
|
162
|
-
WORKER_LABELS_FIELD_NUMBER: _ClassVar[int]
|
|
163
|
-
BACKOFF_FACTOR_FIELD_NUMBER: _ClassVar[int]
|
|
164
|
-
BACKOFF_MAX_SECONDS_FIELD_NUMBER: _ClassVar[int]
|
|
165
|
-
readable_id: str
|
|
166
|
-
action: str
|
|
167
|
-
timeout: str
|
|
168
|
-
inputs: str
|
|
169
|
-
parents: _containers.RepeatedScalarFieldContainer[str]
|
|
170
|
-
user_data: str
|
|
171
|
-
retries: int
|
|
172
|
-
rate_limits: _containers.RepeatedCompositeFieldContainer[CreateStepRateLimit]
|
|
173
|
-
worker_labels: _containers.MessageMap[str, DesiredWorkerLabels]
|
|
174
|
-
backoff_factor: float
|
|
175
|
-
backoff_max_seconds: int
|
|
176
|
-
def __init__(self, readable_id: _Optional[str] = ..., action: _Optional[str] = ..., timeout: _Optional[str] = ..., inputs: _Optional[str] = ..., parents: _Optional[_Iterable[str]] = ..., user_data: _Optional[str] = ..., retries: _Optional[int] = ..., rate_limits: _Optional[_Iterable[_Union[CreateStepRateLimit, _Mapping]]] = ..., worker_labels: _Optional[_Mapping[str, DesiredWorkerLabels]] = ..., backoff_factor: _Optional[float] = ..., backoff_max_seconds: _Optional[int] = ...) -> None: ...
|
|
177
|
-
|
|
178
|
-
class CreateStepRateLimit(_message.Message):
|
|
179
|
-
__slots__ = ("key", "units", "key_expr", "units_expr", "limit_values_expr", "duration")
|
|
180
|
-
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
181
|
-
UNITS_FIELD_NUMBER: _ClassVar[int]
|
|
182
|
-
KEY_EXPR_FIELD_NUMBER: _ClassVar[int]
|
|
183
|
-
UNITS_EXPR_FIELD_NUMBER: _ClassVar[int]
|
|
184
|
-
LIMIT_VALUES_EXPR_FIELD_NUMBER: _ClassVar[int]
|
|
185
|
-
DURATION_FIELD_NUMBER: _ClassVar[int]
|
|
186
|
-
key: str
|
|
187
|
-
units: int
|
|
188
|
-
key_expr: str
|
|
189
|
-
units_expr: str
|
|
190
|
-
limit_values_expr: str
|
|
191
|
-
duration: RateLimitDuration
|
|
192
|
-
def __init__(self, key: _Optional[str] = ..., units: _Optional[int] = ..., key_expr: _Optional[str] = ..., units_expr: _Optional[str] = ..., limit_values_expr: _Optional[str] = ..., duration: _Optional[_Union[RateLimitDuration, str]] = ...) -> None: ...
|
|
193
|
-
|
|
194
|
-
class ListWorkflowsRequest(_message.Message):
|
|
195
|
-
__slots__ = ()
|
|
196
|
-
def __init__(self) -> None: ...
|
|
197
|
-
|
|
198
|
-
class ScheduleWorkflowRequest(_message.Message):
|
|
199
|
-
__slots__ = ("name", "schedules", "input", "parent_id", "parent_step_run_id", "child_index", "child_key", "additional_metadata")
|
|
200
|
-
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
201
|
-
SCHEDULES_FIELD_NUMBER: _ClassVar[int]
|
|
202
|
-
INPUT_FIELD_NUMBER: _ClassVar[int]
|
|
203
|
-
PARENT_ID_FIELD_NUMBER: _ClassVar[int]
|
|
204
|
-
PARENT_STEP_RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
205
|
-
CHILD_INDEX_FIELD_NUMBER: _ClassVar[int]
|
|
206
|
-
CHILD_KEY_FIELD_NUMBER: _ClassVar[int]
|
|
207
|
-
ADDITIONAL_METADATA_FIELD_NUMBER: _ClassVar[int]
|
|
208
|
-
name: str
|
|
209
|
-
schedules: _containers.RepeatedCompositeFieldContainer[_timestamp_pb2.Timestamp]
|
|
210
|
-
input: str
|
|
211
|
-
parent_id: str
|
|
212
|
-
parent_step_run_id: str
|
|
213
|
-
child_index: int
|
|
214
|
-
child_key: str
|
|
215
|
-
additional_metadata: str
|
|
216
|
-
def __init__(self, name: _Optional[str] = ..., schedules: _Optional[_Iterable[_Union[_timestamp_pb2.Timestamp, _Mapping]]] = ..., input: _Optional[str] = ..., parent_id: _Optional[str] = ..., parent_step_run_id: _Optional[str] = ..., child_index: _Optional[int] = ..., child_key: _Optional[str] = ..., additional_metadata: _Optional[str] = ...) -> None: ...
|
|
217
|
-
|
|
218
|
-
class ScheduledWorkflow(_message.Message):
|
|
219
|
-
__slots__ = ("id", "trigger_at")
|
|
220
|
-
ID_FIELD_NUMBER: _ClassVar[int]
|
|
221
|
-
TRIGGER_AT_FIELD_NUMBER: _ClassVar[int]
|
|
222
|
-
id: str
|
|
223
|
-
trigger_at: _timestamp_pb2.Timestamp
|
|
224
|
-
def __init__(self, id: _Optional[str] = ..., trigger_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
|
|
225
|
-
|
|
226
|
-
class WorkflowVersion(_message.Message):
|
|
227
|
-
__slots__ = ("id", "created_at", "updated_at", "version", "order", "workflow_id", "scheduled_workflows")
|
|
228
|
-
ID_FIELD_NUMBER: _ClassVar[int]
|
|
229
|
-
CREATED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
230
|
-
UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
231
|
-
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
232
|
-
ORDER_FIELD_NUMBER: _ClassVar[int]
|
|
233
|
-
WORKFLOW_ID_FIELD_NUMBER: _ClassVar[int]
|
|
234
|
-
SCHEDULED_WORKFLOWS_FIELD_NUMBER: _ClassVar[int]
|
|
235
|
-
id: str
|
|
236
|
-
created_at: _timestamp_pb2.Timestamp
|
|
237
|
-
updated_at: _timestamp_pb2.Timestamp
|
|
238
|
-
version: str
|
|
239
|
-
order: int
|
|
240
|
-
workflow_id: str
|
|
241
|
-
scheduled_workflows: _containers.RepeatedCompositeFieldContainer[ScheduledWorkflow]
|
|
242
|
-
def __init__(self, id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., version: _Optional[str] = ..., order: _Optional[int] = ..., workflow_id: _Optional[str] = ..., scheduled_workflows: _Optional[_Iterable[_Union[ScheduledWorkflow, _Mapping]]] = ...) -> None: ...
|
|
243
|
-
|
|
244
|
-
class WorkflowTriggerEventRef(_message.Message):
|
|
245
|
-
__slots__ = ("parent_id", "event_key")
|
|
246
|
-
PARENT_ID_FIELD_NUMBER: _ClassVar[int]
|
|
247
|
-
EVENT_KEY_FIELD_NUMBER: _ClassVar[int]
|
|
248
|
-
parent_id: str
|
|
249
|
-
event_key: str
|
|
250
|
-
def __init__(self, parent_id: _Optional[str] = ..., event_key: _Optional[str] = ...) -> None: ...
|
|
251
|
-
|
|
252
|
-
class WorkflowTriggerCronRef(_message.Message):
|
|
253
|
-
__slots__ = ("parent_id", "cron")
|
|
254
|
-
PARENT_ID_FIELD_NUMBER: _ClassVar[int]
|
|
255
|
-
CRON_FIELD_NUMBER: _ClassVar[int]
|
|
256
|
-
parent_id: str
|
|
257
|
-
cron: str
|
|
258
|
-
def __init__(self, parent_id: _Optional[str] = ..., cron: _Optional[str] = ...) -> None: ...
|
|
259
|
-
|
|
260
|
-
class BulkTriggerWorkflowRequest(_message.Message):
|
|
261
|
-
__slots__ = ("workflows",)
|
|
262
|
-
WORKFLOWS_FIELD_NUMBER: _ClassVar[int]
|
|
263
|
-
workflows: _containers.RepeatedCompositeFieldContainer[TriggerWorkflowRequest]
|
|
264
|
-
def __init__(self, workflows: _Optional[_Iterable[_Union[TriggerWorkflowRequest, _Mapping]]] = ...) -> None: ...
|
|
265
|
-
|
|
266
|
-
class BulkTriggerWorkflowResponse(_message.Message):
|
|
267
|
-
__slots__ = ("workflow_run_ids",)
|
|
268
|
-
WORKFLOW_RUN_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
269
|
-
workflow_run_ids: _containers.RepeatedScalarFieldContainer[str]
|
|
270
|
-
def __init__(self, workflow_run_ids: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
271
|
-
|
|
272
|
-
class TriggerWorkflowRequest(_message.Message):
|
|
273
|
-
__slots__ = ("name", "input", "parent_id", "parent_step_run_id", "child_index", "child_key", "additional_metadata", "desired_worker_id", "priority")
|
|
274
|
-
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
275
|
-
INPUT_FIELD_NUMBER: _ClassVar[int]
|
|
276
|
-
PARENT_ID_FIELD_NUMBER: _ClassVar[int]
|
|
277
|
-
PARENT_STEP_RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
278
|
-
CHILD_INDEX_FIELD_NUMBER: _ClassVar[int]
|
|
279
|
-
CHILD_KEY_FIELD_NUMBER: _ClassVar[int]
|
|
280
|
-
ADDITIONAL_METADATA_FIELD_NUMBER: _ClassVar[int]
|
|
281
|
-
DESIRED_WORKER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
282
|
-
PRIORITY_FIELD_NUMBER: _ClassVar[int]
|
|
283
|
-
name: str
|
|
284
|
-
input: str
|
|
285
|
-
parent_id: str
|
|
286
|
-
parent_step_run_id: str
|
|
287
|
-
child_index: int
|
|
288
|
-
child_key: str
|
|
289
|
-
additional_metadata: str
|
|
290
|
-
desired_worker_id: str
|
|
291
|
-
priority: int
|
|
292
|
-
def __init__(self, name: _Optional[str] = ..., input: _Optional[str] = ..., parent_id: _Optional[str] = ..., parent_step_run_id: _Optional[str] = ..., child_index: _Optional[int] = ..., child_key: _Optional[str] = ..., additional_metadata: _Optional[str] = ..., desired_worker_id: _Optional[str] = ..., priority: _Optional[int] = ...) -> None: ...
|
|
293
|
-
|
|
294
|
-
class TriggerWorkflowResponse(_message.Message):
|
|
295
|
-
__slots__ = ("workflow_run_id",)
|
|
296
|
-
WORKFLOW_RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
297
|
-
workflow_run_id: str
|
|
298
|
-
def __init__(self, workflow_run_id: _Optional[str] = ...) -> None: ...
|
|
299
|
-
|
|
300
|
-
class PutRateLimitRequest(_message.Message):
|
|
301
|
-
__slots__ = ("key", "limit", "duration")
|
|
302
|
-
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
303
|
-
LIMIT_FIELD_NUMBER: _ClassVar[int]
|
|
304
|
-
DURATION_FIELD_NUMBER: _ClassVar[int]
|
|
305
|
-
key: str
|
|
306
|
-
limit: int
|
|
307
|
-
duration: RateLimitDuration
|
|
308
|
-
def __init__(self, key: _Optional[str] = ..., limit: _Optional[int] = ..., duration: _Optional[_Union[RateLimitDuration, str]] = ...) -> None: ...
|
|
309
|
-
|
|
310
|
-
class PutRateLimitResponse(_message.Message):
|
|
311
|
-
__slots__ = ()
|
|
312
|
-
def __init__(self) -> None: ...
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
-
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
-
import grpc
|
|
4
|
-
import warnings
|
|
5
|
-
|
|
6
|
-
from . import workflows_pb2 as workflows__pb2
|
|
7
|
-
|
|
8
|
-
GRPC_GENERATED_VERSION = '1.64.1'
|
|
9
|
-
GRPC_VERSION = grpc.__version__
|
|
10
|
-
EXPECTED_ERROR_RELEASE = '1.65.0'
|
|
11
|
-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
|
|
12
|
-
_version_not_supported = False
|
|
13
|
-
|
|
14
|
-
try:
|
|
15
|
-
from grpc._utilities import first_version_is_lower
|
|
16
|
-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
17
|
-
except ImportError:
|
|
18
|
-
_version_not_supported = True
|
|
19
|
-
|
|
20
|
-
if _version_not_supported:
|
|
21
|
-
warnings.warn(
|
|
22
|
-
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
23
|
-
+ f' but the generated code in workflows_pb2_grpc.py depends on'
|
|
24
|
-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
25
|
-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
26
|
-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
27
|
-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
|
|
28
|
-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
|
|
29
|
-
RuntimeWarning
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class WorkflowServiceStub(object):
|
|
34
|
-
"""WorkflowService represents a set of RPCs for managing workflows.
|
|
35
|
-
"""
|
|
36
|
-
|
|
37
|
-
def __init__(self, channel):
|
|
38
|
-
"""Constructor.
|
|
39
|
-
|
|
40
|
-
Args:
|
|
41
|
-
channel: A grpc.Channel.
|
|
42
|
-
"""
|
|
43
|
-
self.PutWorkflow = channel.unary_unary(
|
|
44
|
-
'/WorkflowService/PutWorkflow',
|
|
45
|
-
request_serializer=workflows__pb2.PutWorkflowRequest.SerializeToString,
|
|
46
|
-
response_deserializer=workflows__pb2.WorkflowVersion.FromString,
|
|
47
|
-
_registered_method=True)
|
|
48
|
-
self.ScheduleWorkflow = channel.unary_unary(
|
|
49
|
-
'/WorkflowService/ScheduleWorkflow',
|
|
50
|
-
request_serializer=workflows__pb2.ScheduleWorkflowRequest.SerializeToString,
|
|
51
|
-
response_deserializer=workflows__pb2.WorkflowVersion.FromString,
|
|
52
|
-
_registered_method=True)
|
|
53
|
-
self.TriggerWorkflow = channel.unary_unary(
|
|
54
|
-
'/WorkflowService/TriggerWorkflow',
|
|
55
|
-
request_serializer=workflows__pb2.TriggerWorkflowRequest.SerializeToString,
|
|
56
|
-
response_deserializer=workflows__pb2.TriggerWorkflowResponse.FromString,
|
|
57
|
-
_registered_method=True)
|
|
58
|
-
self.BulkTriggerWorkflow = channel.unary_unary(
|
|
59
|
-
'/WorkflowService/BulkTriggerWorkflow',
|
|
60
|
-
request_serializer=workflows__pb2.BulkTriggerWorkflowRequest.SerializeToString,
|
|
61
|
-
response_deserializer=workflows__pb2.BulkTriggerWorkflowResponse.FromString,
|
|
62
|
-
_registered_method=True)
|
|
63
|
-
self.PutRateLimit = channel.unary_unary(
|
|
64
|
-
'/WorkflowService/PutRateLimit',
|
|
65
|
-
request_serializer=workflows__pb2.PutRateLimitRequest.SerializeToString,
|
|
66
|
-
response_deserializer=workflows__pb2.PutRateLimitResponse.FromString,
|
|
67
|
-
_registered_method=True)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
class WorkflowServiceServicer(object):
|
|
71
|
-
"""WorkflowService represents a set of RPCs for managing workflows.
|
|
72
|
-
"""
|
|
73
|
-
|
|
74
|
-
def PutWorkflow(self, request, context):
|
|
75
|
-
"""Missing associated documentation comment in .proto file."""
|
|
76
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
77
|
-
context.set_details('Method not implemented!')
|
|
78
|
-
raise NotImplementedError('Method not implemented!')
|
|
79
|
-
|
|
80
|
-
def ScheduleWorkflow(self, request, context):
|
|
81
|
-
"""Missing associated documentation comment in .proto file."""
|
|
82
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
83
|
-
context.set_details('Method not implemented!')
|
|
84
|
-
raise NotImplementedError('Method not implemented!')
|
|
85
|
-
|
|
86
|
-
def TriggerWorkflow(self, request, context):
|
|
87
|
-
"""Missing associated documentation comment in .proto file."""
|
|
88
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
89
|
-
context.set_details('Method not implemented!')
|
|
90
|
-
raise NotImplementedError('Method not implemented!')
|
|
91
|
-
|
|
92
|
-
def BulkTriggerWorkflow(self, request, context):
|
|
93
|
-
"""Missing associated documentation comment in .proto file."""
|
|
94
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
95
|
-
context.set_details('Method not implemented!')
|
|
96
|
-
raise NotImplementedError('Method not implemented!')
|
|
97
|
-
|
|
98
|
-
def PutRateLimit(self, request, context):
|
|
99
|
-
"""Missing associated documentation comment in .proto file."""
|
|
100
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
101
|
-
context.set_details('Method not implemented!')
|
|
102
|
-
raise NotImplementedError('Method not implemented!')
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def add_WorkflowServiceServicer_to_server(servicer, server):
|
|
106
|
-
rpc_method_handlers = {
|
|
107
|
-
'PutWorkflow': grpc.unary_unary_rpc_method_handler(
|
|
108
|
-
servicer.PutWorkflow,
|
|
109
|
-
request_deserializer=workflows__pb2.PutWorkflowRequest.FromString,
|
|
110
|
-
response_serializer=workflows__pb2.WorkflowVersion.SerializeToString,
|
|
111
|
-
),
|
|
112
|
-
'ScheduleWorkflow': grpc.unary_unary_rpc_method_handler(
|
|
113
|
-
servicer.ScheduleWorkflow,
|
|
114
|
-
request_deserializer=workflows__pb2.ScheduleWorkflowRequest.FromString,
|
|
115
|
-
response_serializer=workflows__pb2.WorkflowVersion.SerializeToString,
|
|
116
|
-
),
|
|
117
|
-
'TriggerWorkflow': grpc.unary_unary_rpc_method_handler(
|
|
118
|
-
servicer.TriggerWorkflow,
|
|
119
|
-
request_deserializer=workflows__pb2.TriggerWorkflowRequest.FromString,
|
|
120
|
-
response_serializer=workflows__pb2.TriggerWorkflowResponse.SerializeToString,
|
|
121
|
-
),
|
|
122
|
-
'BulkTriggerWorkflow': grpc.unary_unary_rpc_method_handler(
|
|
123
|
-
servicer.BulkTriggerWorkflow,
|
|
124
|
-
request_deserializer=workflows__pb2.BulkTriggerWorkflowRequest.FromString,
|
|
125
|
-
response_serializer=workflows__pb2.BulkTriggerWorkflowResponse.SerializeToString,
|
|
126
|
-
),
|
|
127
|
-
'PutRateLimit': grpc.unary_unary_rpc_method_handler(
|
|
128
|
-
servicer.PutRateLimit,
|
|
129
|
-
request_deserializer=workflows__pb2.PutRateLimitRequest.FromString,
|
|
130
|
-
response_serializer=workflows__pb2.PutRateLimitResponse.SerializeToString,
|
|
131
|
-
),
|
|
132
|
-
}
|
|
133
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
134
|
-
'WorkflowService', rpc_method_handlers)
|
|
135
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
136
|
-
server.add_registered_method_handlers('WorkflowService', rpc_method_handlers)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
# This class is part of an EXPERIMENTAL API.
|
|
140
|
-
class WorkflowService(object):
|
|
141
|
-
"""WorkflowService represents a set of RPCs for managing workflows.
|
|
142
|
-
"""
|
|
143
|
-
|
|
144
|
-
@staticmethod
|
|
145
|
-
def PutWorkflow(request,
|
|
146
|
-
target,
|
|
147
|
-
options=(),
|
|
148
|
-
channel_credentials=None,
|
|
149
|
-
call_credentials=None,
|
|
150
|
-
insecure=False,
|
|
151
|
-
compression=None,
|
|
152
|
-
wait_for_ready=None,
|
|
153
|
-
timeout=None,
|
|
154
|
-
metadata=None):
|
|
155
|
-
return grpc.experimental.unary_unary(
|
|
156
|
-
request,
|
|
157
|
-
target,
|
|
158
|
-
'/WorkflowService/PutWorkflow',
|
|
159
|
-
workflows__pb2.PutWorkflowRequest.SerializeToString,
|
|
160
|
-
workflows__pb2.WorkflowVersion.FromString,
|
|
161
|
-
options,
|
|
162
|
-
channel_credentials,
|
|
163
|
-
insecure,
|
|
164
|
-
call_credentials,
|
|
165
|
-
compression,
|
|
166
|
-
wait_for_ready,
|
|
167
|
-
timeout,
|
|
168
|
-
metadata,
|
|
169
|
-
_registered_method=True)
|
|
170
|
-
|
|
171
|
-
@staticmethod
|
|
172
|
-
def ScheduleWorkflow(request,
|
|
173
|
-
target,
|
|
174
|
-
options=(),
|
|
175
|
-
channel_credentials=None,
|
|
176
|
-
call_credentials=None,
|
|
177
|
-
insecure=False,
|
|
178
|
-
compression=None,
|
|
179
|
-
wait_for_ready=None,
|
|
180
|
-
timeout=None,
|
|
181
|
-
metadata=None):
|
|
182
|
-
return grpc.experimental.unary_unary(
|
|
183
|
-
request,
|
|
184
|
-
target,
|
|
185
|
-
'/WorkflowService/ScheduleWorkflow',
|
|
186
|
-
workflows__pb2.ScheduleWorkflowRequest.SerializeToString,
|
|
187
|
-
workflows__pb2.WorkflowVersion.FromString,
|
|
188
|
-
options,
|
|
189
|
-
channel_credentials,
|
|
190
|
-
insecure,
|
|
191
|
-
call_credentials,
|
|
192
|
-
compression,
|
|
193
|
-
wait_for_ready,
|
|
194
|
-
timeout,
|
|
195
|
-
metadata,
|
|
196
|
-
_registered_method=True)
|
|
197
|
-
|
|
198
|
-
@staticmethod
|
|
199
|
-
def TriggerWorkflow(request,
|
|
200
|
-
target,
|
|
201
|
-
options=(),
|
|
202
|
-
channel_credentials=None,
|
|
203
|
-
call_credentials=None,
|
|
204
|
-
insecure=False,
|
|
205
|
-
compression=None,
|
|
206
|
-
wait_for_ready=None,
|
|
207
|
-
timeout=None,
|
|
208
|
-
metadata=None):
|
|
209
|
-
return grpc.experimental.unary_unary(
|
|
210
|
-
request,
|
|
211
|
-
target,
|
|
212
|
-
'/WorkflowService/TriggerWorkflow',
|
|
213
|
-
workflows__pb2.TriggerWorkflowRequest.SerializeToString,
|
|
214
|
-
workflows__pb2.TriggerWorkflowResponse.FromString,
|
|
215
|
-
options,
|
|
216
|
-
channel_credentials,
|
|
217
|
-
insecure,
|
|
218
|
-
call_credentials,
|
|
219
|
-
compression,
|
|
220
|
-
wait_for_ready,
|
|
221
|
-
timeout,
|
|
222
|
-
metadata,
|
|
223
|
-
_registered_method=True)
|
|
224
|
-
|
|
225
|
-
@staticmethod
|
|
226
|
-
def BulkTriggerWorkflow(request,
|
|
227
|
-
target,
|
|
228
|
-
options=(),
|
|
229
|
-
channel_credentials=None,
|
|
230
|
-
call_credentials=None,
|
|
231
|
-
insecure=False,
|
|
232
|
-
compression=None,
|
|
233
|
-
wait_for_ready=None,
|
|
234
|
-
timeout=None,
|
|
235
|
-
metadata=None):
|
|
236
|
-
return grpc.experimental.unary_unary(
|
|
237
|
-
request,
|
|
238
|
-
target,
|
|
239
|
-
'/WorkflowService/BulkTriggerWorkflow',
|
|
240
|
-
workflows__pb2.BulkTriggerWorkflowRequest.SerializeToString,
|
|
241
|
-
workflows__pb2.BulkTriggerWorkflowResponse.FromString,
|
|
242
|
-
options,
|
|
243
|
-
channel_credentials,
|
|
244
|
-
insecure,
|
|
245
|
-
call_credentials,
|
|
246
|
-
compression,
|
|
247
|
-
wait_for_ready,
|
|
248
|
-
timeout,
|
|
249
|
-
metadata,
|
|
250
|
-
_registered_method=True)
|
|
251
|
-
|
|
252
|
-
@staticmethod
|
|
253
|
-
def PutRateLimit(request,
|
|
254
|
-
target,
|
|
255
|
-
options=(),
|
|
256
|
-
channel_credentials=None,
|
|
257
|
-
call_credentials=None,
|
|
258
|
-
insecure=False,
|
|
259
|
-
compression=None,
|
|
260
|
-
wait_for_ready=None,
|
|
261
|
-
timeout=None,
|
|
262
|
-
metadata=None):
|
|
263
|
-
return grpc.experimental.unary_unary(
|
|
264
|
-
request,
|
|
265
|
-
target,
|
|
266
|
-
'/WorkflowService/PutRateLimit',
|
|
267
|
-
workflows__pb2.PutRateLimitRequest.SerializeToString,
|
|
268
|
-
workflows__pb2.PutRateLimitResponse.FromString,
|
|
269
|
-
options,
|
|
270
|
-
channel_credentials,
|
|
271
|
-
insecure,
|
|
272
|
-
call_credentials,
|
|
273
|
-
compression,
|
|
274
|
-
wait_for_ready,
|
|
275
|
-
timeout,
|
|
276
|
-
metadata,
|
|
277
|
-
_registered_method=True)
|
hatchet_sdk/v0/logger.py
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
# Create a named logger
|
|
5
|
-
logger = logging.getLogger("hatchet")
|
|
6
|
-
logger.setLevel(logging.INFO)
|
|
7
|
-
|
|
8
|
-
handler = logging.StreamHandler(sys.stdout)
|
|
9
|
-
formatter = logging.Formatter("[%(levelname)s]\t🪓 -- %(asctime)s - %(message)s")
|
|
10
|
-
handler.setFormatter(formatter)
|
|
11
|
-
logger.addHandler(handler)
|
|
12
|
-
|
|
13
|
-
logger.propagate = False
|
|
File without changes
|
|
File without changes
|