hatchet-sdk 1.12.3__py3-none-any.whl → 1.14.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/__init__.py +54 -40
- hatchet_sdk/clients/admin.py +18 -23
- hatchet_sdk/clients/dispatcher/action_listener.py +4 -3
- hatchet_sdk/clients/dispatcher/dispatcher.py +1 -4
- hatchet_sdk/clients/event_ts.py +2 -1
- hatchet_sdk/clients/events.py +16 -12
- hatchet_sdk/clients/listeners/durable_event_listener.py +4 -2
- hatchet_sdk/clients/listeners/pooled_listener.py +2 -2
- hatchet_sdk/clients/listeners/run_event_listener.py +7 -8
- hatchet_sdk/clients/listeners/workflow_listener.py +14 -6
- hatchet_sdk/clients/rest/api_response.py +3 -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/clients/rest/tenacity_utils.py +6 -8
- hatchet_sdk/config.py +2 -0
- hatchet_sdk/connection.py +10 -4
- hatchet_sdk/context/context.py +170 -46
- hatchet_sdk/context/worker_context.py +4 -7
- hatchet_sdk/contracts/dispatcher_pb2.py +38 -38
- hatchet_sdk/contracts/dispatcher_pb2.pyi +4 -2
- hatchet_sdk/contracts/events_pb2.py +13 -13
- hatchet_sdk/contracts/events_pb2.pyi +4 -2
- hatchet_sdk/contracts/v1/workflows_pb2.py +1 -1
- hatchet_sdk/contracts/v1/workflows_pb2.pyi +2 -2
- hatchet_sdk/exceptions.py +103 -1
- hatchet_sdk/features/cron.py +2 -2
- hatchet_sdk/features/filters.py +12 -21
- hatchet_sdk/features/runs.py +4 -4
- hatchet_sdk/features/scheduled.py +8 -9
- hatchet_sdk/hatchet.py +65 -64
- hatchet_sdk/opentelemetry/instrumentor.py +20 -20
- hatchet_sdk/runnables/action.py +1 -2
- hatchet_sdk/runnables/contextvars.py +19 -0
- hatchet_sdk/runnables/task.py +37 -29
- hatchet_sdk/runnables/types.py +9 -8
- hatchet_sdk/runnables/workflow.py +57 -42
- hatchet_sdk/utils/proto_enums.py +4 -4
- hatchet_sdk/utils/timedelta_to_expression.py +2 -3
- hatchet_sdk/utils/typing.py +11 -17
- 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/waits.py +6 -5
- hatchet_sdk/worker/action_listener_process.py +33 -13
- hatchet_sdk/worker/runner/run_loop_manager.py +15 -11
- hatchet_sdk/worker/runner/runner.py +142 -80
- hatchet_sdk/worker/runner/utils/capture_logs.py +72 -31
- hatchet_sdk/worker/worker.py +30 -26
- hatchet_sdk/workflow_run.py +4 -2
- {hatchet_sdk-1.12.3.dist-info → hatchet_sdk-1.14.0.dist-info}/METADATA +1 -1
- {hatchet_sdk-1.12.3.dist-info → hatchet_sdk-1.14.0.dist-info}/RECORD +73 -83
- 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.12.3.dist-info → hatchet_sdk-1.14.0.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.12.3.dist-info → hatchet_sdk-1.14.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,621 +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 dispatcher_pb2 as dispatcher__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 dispatcher_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 DispatcherStub(object):
|
|
34
|
-
"""Missing associated documentation comment in .proto file."""
|
|
35
|
-
|
|
36
|
-
def __init__(self, channel):
|
|
37
|
-
"""Constructor.
|
|
38
|
-
|
|
39
|
-
Args:
|
|
40
|
-
channel: A grpc.Channel.
|
|
41
|
-
"""
|
|
42
|
-
self.Register = channel.unary_unary(
|
|
43
|
-
'/Dispatcher/Register',
|
|
44
|
-
request_serializer=dispatcher__pb2.WorkerRegisterRequest.SerializeToString,
|
|
45
|
-
response_deserializer=dispatcher__pb2.WorkerRegisterResponse.FromString,
|
|
46
|
-
_registered_method=True)
|
|
47
|
-
self.Listen = channel.unary_stream(
|
|
48
|
-
'/Dispatcher/Listen',
|
|
49
|
-
request_serializer=dispatcher__pb2.WorkerListenRequest.SerializeToString,
|
|
50
|
-
response_deserializer=dispatcher__pb2.AssignedAction.FromString,
|
|
51
|
-
_registered_method=True)
|
|
52
|
-
self.ListenV2 = channel.unary_stream(
|
|
53
|
-
'/Dispatcher/ListenV2',
|
|
54
|
-
request_serializer=dispatcher__pb2.WorkerListenRequest.SerializeToString,
|
|
55
|
-
response_deserializer=dispatcher__pb2.AssignedAction.FromString,
|
|
56
|
-
_registered_method=True)
|
|
57
|
-
self.Heartbeat = channel.unary_unary(
|
|
58
|
-
'/Dispatcher/Heartbeat',
|
|
59
|
-
request_serializer=dispatcher__pb2.HeartbeatRequest.SerializeToString,
|
|
60
|
-
response_deserializer=dispatcher__pb2.HeartbeatResponse.FromString,
|
|
61
|
-
_registered_method=True)
|
|
62
|
-
self.SubscribeToWorkflowEvents = channel.unary_stream(
|
|
63
|
-
'/Dispatcher/SubscribeToWorkflowEvents',
|
|
64
|
-
request_serializer=dispatcher__pb2.SubscribeToWorkflowEventsRequest.SerializeToString,
|
|
65
|
-
response_deserializer=dispatcher__pb2.WorkflowEvent.FromString,
|
|
66
|
-
_registered_method=True)
|
|
67
|
-
self.SubscribeToWorkflowRuns = channel.stream_stream(
|
|
68
|
-
'/Dispatcher/SubscribeToWorkflowRuns',
|
|
69
|
-
request_serializer=dispatcher__pb2.SubscribeToWorkflowRunsRequest.SerializeToString,
|
|
70
|
-
response_deserializer=dispatcher__pb2.WorkflowRunEvent.FromString,
|
|
71
|
-
_registered_method=True)
|
|
72
|
-
self.SendStepActionEvent = channel.unary_unary(
|
|
73
|
-
'/Dispatcher/SendStepActionEvent',
|
|
74
|
-
request_serializer=dispatcher__pb2.StepActionEvent.SerializeToString,
|
|
75
|
-
response_deserializer=dispatcher__pb2.ActionEventResponse.FromString,
|
|
76
|
-
_registered_method=True)
|
|
77
|
-
self.SendGroupKeyActionEvent = channel.unary_unary(
|
|
78
|
-
'/Dispatcher/SendGroupKeyActionEvent',
|
|
79
|
-
request_serializer=dispatcher__pb2.GroupKeyActionEvent.SerializeToString,
|
|
80
|
-
response_deserializer=dispatcher__pb2.ActionEventResponse.FromString,
|
|
81
|
-
_registered_method=True)
|
|
82
|
-
self.PutOverridesData = channel.unary_unary(
|
|
83
|
-
'/Dispatcher/PutOverridesData',
|
|
84
|
-
request_serializer=dispatcher__pb2.OverridesData.SerializeToString,
|
|
85
|
-
response_deserializer=dispatcher__pb2.OverridesDataResponse.FromString,
|
|
86
|
-
_registered_method=True)
|
|
87
|
-
self.Unsubscribe = channel.unary_unary(
|
|
88
|
-
'/Dispatcher/Unsubscribe',
|
|
89
|
-
request_serializer=dispatcher__pb2.WorkerUnsubscribeRequest.SerializeToString,
|
|
90
|
-
response_deserializer=dispatcher__pb2.WorkerUnsubscribeResponse.FromString,
|
|
91
|
-
_registered_method=True)
|
|
92
|
-
self.RefreshTimeout = channel.unary_unary(
|
|
93
|
-
'/Dispatcher/RefreshTimeout',
|
|
94
|
-
request_serializer=dispatcher__pb2.RefreshTimeoutRequest.SerializeToString,
|
|
95
|
-
response_deserializer=dispatcher__pb2.RefreshTimeoutResponse.FromString,
|
|
96
|
-
_registered_method=True)
|
|
97
|
-
self.ReleaseSlot = channel.unary_unary(
|
|
98
|
-
'/Dispatcher/ReleaseSlot',
|
|
99
|
-
request_serializer=dispatcher__pb2.ReleaseSlotRequest.SerializeToString,
|
|
100
|
-
response_deserializer=dispatcher__pb2.ReleaseSlotResponse.FromString,
|
|
101
|
-
_registered_method=True)
|
|
102
|
-
self.UpsertWorkerLabels = channel.unary_unary(
|
|
103
|
-
'/Dispatcher/UpsertWorkerLabels',
|
|
104
|
-
request_serializer=dispatcher__pb2.UpsertWorkerLabelsRequest.SerializeToString,
|
|
105
|
-
response_deserializer=dispatcher__pb2.UpsertWorkerLabelsResponse.FromString,
|
|
106
|
-
_registered_method=True)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
class DispatcherServicer(object):
|
|
110
|
-
"""Missing associated documentation comment in .proto file."""
|
|
111
|
-
|
|
112
|
-
def Register(self, request, context):
|
|
113
|
-
"""Missing associated documentation comment in .proto file."""
|
|
114
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
115
|
-
context.set_details('Method not implemented!')
|
|
116
|
-
raise NotImplementedError('Method not implemented!')
|
|
117
|
-
|
|
118
|
-
def Listen(self, request, context):
|
|
119
|
-
"""Missing associated documentation comment in .proto file."""
|
|
120
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
121
|
-
context.set_details('Method not implemented!')
|
|
122
|
-
raise NotImplementedError('Method not implemented!')
|
|
123
|
-
|
|
124
|
-
def ListenV2(self, request, context):
|
|
125
|
-
"""ListenV2 is like listen, but implementation does not include heartbeats. This should only used by SDKs
|
|
126
|
-
against engine version v0.18.1+
|
|
127
|
-
"""
|
|
128
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
129
|
-
context.set_details('Method not implemented!')
|
|
130
|
-
raise NotImplementedError('Method not implemented!')
|
|
131
|
-
|
|
132
|
-
def Heartbeat(self, request, context):
|
|
133
|
-
"""Heartbeat is a method for workers to send heartbeats to the dispatcher
|
|
134
|
-
"""
|
|
135
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
136
|
-
context.set_details('Method not implemented!')
|
|
137
|
-
raise NotImplementedError('Method not implemented!')
|
|
138
|
-
|
|
139
|
-
def SubscribeToWorkflowEvents(self, request, context):
|
|
140
|
-
"""Missing associated documentation comment in .proto file."""
|
|
141
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
142
|
-
context.set_details('Method not implemented!')
|
|
143
|
-
raise NotImplementedError('Method not implemented!')
|
|
144
|
-
|
|
145
|
-
def SubscribeToWorkflowRuns(self, request_iterator, context):
|
|
146
|
-
"""Missing associated documentation comment in .proto file."""
|
|
147
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
148
|
-
context.set_details('Method not implemented!')
|
|
149
|
-
raise NotImplementedError('Method not implemented!')
|
|
150
|
-
|
|
151
|
-
def SendStepActionEvent(self, request, context):
|
|
152
|
-
"""Missing associated documentation comment in .proto file."""
|
|
153
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
154
|
-
context.set_details('Method not implemented!')
|
|
155
|
-
raise NotImplementedError('Method not implemented!')
|
|
156
|
-
|
|
157
|
-
def SendGroupKeyActionEvent(self, request, context):
|
|
158
|
-
"""Missing associated documentation comment in .proto file."""
|
|
159
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
160
|
-
context.set_details('Method not implemented!')
|
|
161
|
-
raise NotImplementedError('Method not implemented!')
|
|
162
|
-
|
|
163
|
-
def PutOverridesData(self, request, context):
|
|
164
|
-
"""Missing associated documentation comment in .proto file."""
|
|
165
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
166
|
-
context.set_details('Method not implemented!')
|
|
167
|
-
raise NotImplementedError('Method not implemented!')
|
|
168
|
-
|
|
169
|
-
def Unsubscribe(self, request, context):
|
|
170
|
-
"""Missing associated documentation comment in .proto file."""
|
|
171
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
172
|
-
context.set_details('Method not implemented!')
|
|
173
|
-
raise NotImplementedError('Method not implemented!')
|
|
174
|
-
|
|
175
|
-
def RefreshTimeout(self, request, context):
|
|
176
|
-
"""Missing associated documentation comment in .proto file."""
|
|
177
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
178
|
-
context.set_details('Method not implemented!')
|
|
179
|
-
raise NotImplementedError('Method not implemented!')
|
|
180
|
-
|
|
181
|
-
def ReleaseSlot(self, request, context):
|
|
182
|
-
"""Missing associated documentation comment in .proto file."""
|
|
183
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
184
|
-
context.set_details('Method not implemented!')
|
|
185
|
-
raise NotImplementedError('Method not implemented!')
|
|
186
|
-
|
|
187
|
-
def UpsertWorkerLabels(self, request, context):
|
|
188
|
-
"""Missing associated documentation comment in .proto file."""
|
|
189
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
190
|
-
context.set_details('Method not implemented!')
|
|
191
|
-
raise NotImplementedError('Method not implemented!')
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
def add_DispatcherServicer_to_server(servicer, server):
|
|
195
|
-
rpc_method_handlers = {
|
|
196
|
-
'Register': grpc.unary_unary_rpc_method_handler(
|
|
197
|
-
servicer.Register,
|
|
198
|
-
request_deserializer=dispatcher__pb2.WorkerRegisterRequest.FromString,
|
|
199
|
-
response_serializer=dispatcher__pb2.WorkerRegisterResponse.SerializeToString,
|
|
200
|
-
),
|
|
201
|
-
'Listen': grpc.unary_stream_rpc_method_handler(
|
|
202
|
-
servicer.Listen,
|
|
203
|
-
request_deserializer=dispatcher__pb2.WorkerListenRequest.FromString,
|
|
204
|
-
response_serializer=dispatcher__pb2.AssignedAction.SerializeToString,
|
|
205
|
-
),
|
|
206
|
-
'ListenV2': grpc.unary_stream_rpc_method_handler(
|
|
207
|
-
servicer.ListenV2,
|
|
208
|
-
request_deserializer=dispatcher__pb2.WorkerListenRequest.FromString,
|
|
209
|
-
response_serializer=dispatcher__pb2.AssignedAction.SerializeToString,
|
|
210
|
-
),
|
|
211
|
-
'Heartbeat': grpc.unary_unary_rpc_method_handler(
|
|
212
|
-
servicer.Heartbeat,
|
|
213
|
-
request_deserializer=dispatcher__pb2.HeartbeatRequest.FromString,
|
|
214
|
-
response_serializer=dispatcher__pb2.HeartbeatResponse.SerializeToString,
|
|
215
|
-
),
|
|
216
|
-
'SubscribeToWorkflowEvents': grpc.unary_stream_rpc_method_handler(
|
|
217
|
-
servicer.SubscribeToWorkflowEvents,
|
|
218
|
-
request_deserializer=dispatcher__pb2.SubscribeToWorkflowEventsRequest.FromString,
|
|
219
|
-
response_serializer=dispatcher__pb2.WorkflowEvent.SerializeToString,
|
|
220
|
-
),
|
|
221
|
-
'SubscribeToWorkflowRuns': grpc.stream_stream_rpc_method_handler(
|
|
222
|
-
servicer.SubscribeToWorkflowRuns,
|
|
223
|
-
request_deserializer=dispatcher__pb2.SubscribeToWorkflowRunsRequest.FromString,
|
|
224
|
-
response_serializer=dispatcher__pb2.WorkflowRunEvent.SerializeToString,
|
|
225
|
-
),
|
|
226
|
-
'SendStepActionEvent': grpc.unary_unary_rpc_method_handler(
|
|
227
|
-
servicer.SendStepActionEvent,
|
|
228
|
-
request_deserializer=dispatcher__pb2.StepActionEvent.FromString,
|
|
229
|
-
response_serializer=dispatcher__pb2.ActionEventResponse.SerializeToString,
|
|
230
|
-
),
|
|
231
|
-
'SendGroupKeyActionEvent': grpc.unary_unary_rpc_method_handler(
|
|
232
|
-
servicer.SendGroupKeyActionEvent,
|
|
233
|
-
request_deserializer=dispatcher__pb2.GroupKeyActionEvent.FromString,
|
|
234
|
-
response_serializer=dispatcher__pb2.ActionEventResponse.SerializeToString,
|
|
235
|
-
),
|
|
236
|
-
'PutOverridesData': grpc.unary_unary_rpc_method_handler(
|
|
237
|
-
servicer.PutOverridesData,
|
|
238
|
-
request_deserializer=dispatcher__pb2.OverridesData.FromString,
|
|
239
|
-
response_serializer=dispatcher__pb2.OverridesDataResponse.SerializeToString,
|
|
240
|
-
),
|
|
241
|
-
'Unsubscribe': grpc.unary_unary_rpc_method_handler(
|
|
242
|
-
servicer.Unsubscribe,
|
|
243
|
-
request_deserializer=dispatcher__pb2.WorkerUnsubscribeRequest.FromString,
|
|
244
|
-
response_serializer=dispatcher__pb2.WorkerUnsubscribeResponse.SerializeToString,
|
|
245
|
-
),
|
|
246
|
-
'RefreshTimeout': grpc.unary_unary_rpc_method_handler(
|
|
247
|
-
servicer.RefreshTimeout,
|
|
248
|
-
request_deserializer=dispatcher__pb2.RefreshTimeoutRequest.FromString,
|
|
249
|
-
response_serializer=dispatcher__pb2.RefreshTimeoutResponse.SerializeToString,
|
|
250
|
-
),
|
|
251
|
-
'ReleaseSlot': grpc.unary_unary_rpc_method_handler(
|
|
252
|
-
servicer.ReleaseSlot,
|
|
253
|
-
request_deserializer=dispatcher__pb2.ReleaseSlotRequest.FromString,
|
|
254
|
-
response_serializer=dispatcher__pb2.ReleaseSlotResponse.SerializeToString,
|
|
255
|
-
),
|
|
256
|
-
'UpsertWorkerLabels': grpc.unary_unary_rpc_method_handler(
|
|
257
|
-
servicer.UpsertWorkerLabels,
|
|
258
|
-
request_deserializer=dispatcher__pb2.UpsertWorkerLabelsRequest.FromString,
|
|
259
|
-
response_serializer=dispatcher__pb2.UpsertWorkerLabelsResponse.SerializeToString,
|
|
260
|
-
),
|
|
261
|
-
}
|
|
262
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
263
|
-
'Dispatcher', rpc_method_handlers)
|
|
264
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
265
|
-
server.add_registered_method_handlers('Dispatcher', rpc_method_handlers)
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
# This class is part of an EXPERIMENTAL API.
|
|
269
|
-
class Dispatcher(object):
|
|
270
|
-
"""Missing associated documentation comment in .proto file."""
|
|
271
|
-
|
|
272
|
-
@staticmethod
|
|
273
|
-
def Register(request,
|
|
274
|
-
target,
|
|
275
|
-
options=(),
|
|
276
|
-
channel_credentials=None,
|
|
277
|
-
call_credentials=None,
|
|
278
|
-
insecure=False,
|
|
279
|
-
compression=None,
|
|
280
|
-
wait_for_ready=None,
|
|
281
|
-
timeout=None,
|
|
282
|
-
metadata=None):
|
|
283
|
-
return grpc.experimental.unary_unary(
|
|
284
|
-
request,
|
|
285
|
-
target,
|
|
286
|
-
'/Dispatcher/Register',
|
|
287
|
-
dispatcher__pb2.WorkerRegisterRequest.SerializeToString,
|
|
288
|
-
dispatcher__pb2.WorkerRegisterResponse.FromString,
|
|
289
|
-
options,
|
|
290
|
-
channel_credentials,
|
|
291
|
-
insecure,
|
|
292
|
-
call_credentials,
|
|
293
|
-
compression,
|
|
294
|
-
wait_for_ready,
|
|
295
|
-
timeout,
|
|
296
|
-
metadata,
|
|
297
|
-
_registered_method=True)
|
|
298
|
-
|
|
299
|
-
@staticmethod
|
|
300
|
-
def Listen(request,
|
|
301
|
-
target,
|
|
302
|
-
options=(),
|
|
303
|
-
channel_credentials=None,
|
|
304
|
-
call_credentials=None,
|
|
305
|
-
insecure=False,
|
|
306
|
-
compression=None,
|
|
307
|
-
wait_for_ready=None,
|
|
308
|
-
timeout=None,
|
|
309
|
-
metadata=None):
|
|
310
|
-
return grpc.experimental.unary_stream(
|
|
311
|
-
request,
|
|
312
|
-
target,
|
|
313
|
-
'/Dispatcher/Listen',
|
|
314
|
-
dispatcher__pb2.WorkerListenRequest.SerializeToString,
|
|
315
|
-
dispatcher__pb2.AssignedAction.FromString,
|
|
316
|
-
options,
|
|
317
|
-
channel_credentials,
|
|
318
|
-
insecure,
|
|
319
|
-
call_credentials,
|
|
320
|
-
compression,
|
|
321
|
-
wait_for_ready,
|
|
322
|
-
timeout,
|
|
323
|
-
metadata,
|
|
324
|
-
_registered_method=True)
|
|
325
|
-
|
|
326
|
-
@staticmethod
|
|
327
|
-
def ListenV2(request,
|
|
328
|
-
target,
|
|
329
|
-
options=(),
|
|
330
|
-
channel_credentials=None,
|
|
331
|
-
call_credentials=None,
|
|
332
|
-
insecure=False,
|
|
333
|
-
compression=None,
|
|
334
|
-
wait_for_ready=None,
|
|
335
|
-
timeout=None,
|
|
336
|
-
metadata=None):
|
|
337
|
-
return grpc.experimental.unary_stream(
|
|
338
|
-
request,
|
|
339
|
-
target,
|
|
340
|
-
'/Dispatcher/ListenV2',
|
|
341
|
-
dispatcher__pb2.WorkerListenRequest.SerializeToString,
|
|
342
|
-
dispatcher__pb2.AssignedAction.FromString,
|
|
343
|
-
options,
|
|
344
|
-
channel_credentials,
|
|
345
|
-
insecure,
|
|
346
|
-
call_credentials,
|
|
347
|
-
compression,
|
|
348
|
-
wait_for_ready,
|
|
349
|
-
timeout,
|
|
350
|
-
metadata,
|
|
351
|
-
_registered_method=True)
|
|
352
|
-
|
|
353
|
-
@staticmethod
|
|
354
|
-
def Heartbeat(request,
|
|
355
|
-
target,
|
|
356
|
-
options=(),
|
|
357
|
-
channel_credentials=None,
|
|
358
|
-
call_credentials=None,
|
|
359
|
-
insecure=False,
|
|
360
|
-
compression=None,
|
|
361
|
-
wait_for_ready=None,
|
|
362
|
-
timeout=None,
|
|
363
|
-
metadata=None):
|
|
364
|
-
return grpc.experimental.unary_unary(
|
|
365
|
-
request,
|
|
366
|
-
target,
|
|
367
|
-
'/Dispatcher/Heartbeat',
|
|
368
|
-
dispatcher__pb2.HeartbeatRequest.SerializeToString,
|
|
369
|
-
dispatcher__pb2.HeartbeatResponse.FromString,
|
|
370
|
-
options,
|
|
371
|
-
channel_credentials,
|
|
372
|
-
insecure,
|
|
373
|
-
call_credentials,
|
|
374
|
-
compression,
|
|
375
|
-
wait_for_ready,
|
|
376
|
-
timeout,
|
|
377
|
-
metadata,
|
|
378
|
-
_registered_method=True)
|
|
379
|
-
|
|
380
|
-
@staticmethod
|
|
381
|
-
def SubscribeToWorkflowEvents(request,
|
|
382
|
-
target,
|
|
383
|
-
options=(),
|
|
384
|
-
channel_credentials=None,
|
|
385
|
-
call_credentials=None,
|
|
386
|
-
insecure=False,
|
|
387
|
-
compression=None,
|
|
388
|
-
wait_for_ready=None,
|
|
389
|
-
timeout=None,
|
|
390
|
-
metadata=None):
|
|
391
|
-
return grpc.experimental.unary_stream(
|
|
392
|
-
request,
|
|
393
|
-
target,
|
|
394
|
-
'/Dispatcher/SubscribeToWorkflowEvents',
|
|
395
|
-
dispatcher__pb2.SubscribeToWorkflowEventsRequest.SerializeToString,
|
|
396
|
-
dispatcher__pb2.WorkflowEvent.FromString,
|
|
397
|
-
options,
|
|
398
|
-
channel_credentials,
|
|
399
|
-
insecure,
|
|
400
|
-
call_credentials,
|
|
401
|
-
compression,
|
|
402
|
-
wait_for_ready,
|
|
403
|
-
timeout,
|
|
404
|
-
metadata,
|
|
405
|
-
_registered_method=True)
|
|
406
|
-
|
|
407
|
-
@staticmethod
|
|
408
|
-
def SubscribeToWorkflowRuns(request_iterator,
|
|
409
|
-
target,
|
|
410
|
-
options=(),
|
|
411
|
-
channel_credentials=None,
|
|
412
|
-
call_credentials=None,
|
|
413
|
-
insecure=False,
|
|
414
|
-
compression=None,
|
|
415
|
-
wait_for_ready=None,
|
|
416
|
-
timeout=None,
|
|
417
|
-
metadata=None):
|
|
418
|
-
return grpc.experimental.stream_stream(
|
|
419
|
-
request_iterator,
|
|
420
|
-
target,
|
|
421
|
-
'/Dispatcher/SubscribeToWorkflowRuns',
|
|
422
|
-
dispatcher__pb2.SubscribeToWorkflowRunsRequest.SerializeToString,
|
|
423
|
-
dispatcher__pb2.WorkflowRunEvent.FromString,
|
|
424
|
-
options,
|
|
425
|
-
channel_credentials,
|
|
426
|
-
insecure,
|
|
427
|
-
call_credentials,
|
|
428
|
-
compression,
|
|
429
|
-
wait_for_ready,
|
|
430
|
-
timeout,
|
|
431
|
-
metadata,
|
|
432
|
-
_registered_method=True)
|
|
433
|
-
|
|
434
|
-
@staticmethod
|
|
435
|
-
def SendStepActionEvent(request,
|
|
436
|
-
target,
|
|
437
|
-
options=(),
|
|
438
|
-
channel_credentials=None,
|
|
439
|
-
call_credentials=None,
|
|
440
|
-
insecure=False,
|
|
441
|
-
compression=None,
|
|
442
|
-
wait_for_ready=None,
|
|
443
|
-
timeout=None,
|
|
444
|
-
metadata=None):
|
|
445
|
-
return grpc.experimental.unary_unary(
|
|
446
|
-
request,
|
|
447
|
-
target,
|
|
448
|
-
'/Dispatcher/SendStepActionEvent',
|
|
449
|
-
dispatcher__pb2.StepActionEvent.SerializeToString,
|
|
450
|
-
dispatcher__pb2.ActionEventResponse.FromString,
|
|
451
|
-
options,
|
|
452
|
-
channel_credentials,
|
|
453
|
-
insecure,
|
|
454
|
-
call_credentials,
|
|
455
|
-
compression,
|
|
456
|
-
wait_for_ready,
|
|
457
|
-
timeout,
|
|
458
|
-
metadata,
|
|
459
|
-
_registered_method=True)
|
|
460
|
-
|
|
461
|
-
@staticmethod
|
|
462
|
-
def SendGroupKeyActionEvent(request,
|
|
463
|
-
target,
|
|
464
|
-
options=(),
|
|
465
|
-
channel_credentials=None,
|
|
466
|
-
call_credentials=None,
|
|
467
|
-
insecure=False,
|
|
468
|
-
compression=None,
|
|
469
|
-
wait_for_ready=None,
|
|
470
|
-
timeout=None,
|
|
471
|
-
metadata=None):
|
|
472
|
-
return grpc.experimental.unary_unary(
|
|
473
|
-
request,
|
|
474
|
-
target,
|
|
475
|
-
'/Dispatcher/SendGroupKeyActionEvent',
|
|
476
|
-
dispatcher__pb2.GroupKeyActionEvent.SerializeToString,
|
|
477
|
-
dispatcher__pb2.ActionEventResponse.FromString,
|
|
478
|
-
options,
|
|
479
|
-
channel_credentials,
|
|
480
|
-
insecure,
|
|
481
|
-
call_credentials,
|
|
482
|
-
compression,
|
|
483
|
-
wait_for_ready,
|
|
484
|
-
timeout,
|
|
485
|
-
metadata,
|
|
486
|
-
_registered_method=True)
|
|
487
|
-
|
|
488
|
-
@staticmethod
|
|
489
|
-
def PutOverridesData(request,
|
|
490
|
-
target,
|
|
491
|
-
options=(),
|
|
492
|
-
channel_credentials=None,
|
|
493
|
-
call_credentials=None,
|
|
494
|
-
insecure=False,
|
|
495
|
-
compression=None,
|
|
496
|
-
wait_for_ready=None,
|
|
497
|
-
timeout=None,
|
|
498
|
-
metadata=None):
|
|
499
|
-
return grpc.experimental.unary_unary(
|
|
500
|
-
request,
|
|
501
|
-
target,
|
|
502
|
-
'/Dispatcher/PutOverridesData',
|
|
503
|
-
dispatcher__pb2.OverridesData.SerializeToString,
|
|
504
|
-
dispatcher__pb2.OverridesDataResponse.FromString,
|
|
505
|
-
options,
|
|
506
|
-
channel_credentials,
|
|
507
|
-
insecure,
|
|
508
|
-
call_credentials,
|
|
509
|
-
compression,
|
|
510
|
-
wait_for_ready,
|
|
511
|
-
timeout,
|
|
512
|
-
metadata,
|
|
513
|
-
_registered_method=True)
|
|
514
|
-
|
|
515
|
-
@staticmethod
|
|
516
|
-
def Unsubscribe(request,
|
|
517
|
-
target,
|
|
518
|
-
options=(),
|
|
519
|
-
channel_credentials=None,
|
|
520
|
-
call_credentials=None,
|
|
521
|
-
insecure=False,
|
|
522
|
-
compression=None,
|
|
523
|
-
wait_for_ready=None,
|
|
524
|
-
timeout=None,
|
|
525
|
-
metadata=None):
|
|
526
|
-
return grpc.experimental.unary_unary(
|
|
527
|
-
request,
|
|
528
|
-
target,
|
|
529
|
-
'/Dispatcher/Unsubscribe',
|
|
530
|
-
dispatcher__pb2.WorkerUnsubscribeRequest.SerializeToString,
|
|
531
|
-
dispatcher__pb2.WorkerUnsubscribeResponse.FromString,
|
|
532
|
-
options,
|
|
533
|
-
channel_credentials,
|
|
534
|
-
insecure,
|
|
535
|
-
call_credentials,
|
|
536
|
-
compression,
|
|
537
|
-
wait_for_ready,
|
|
538
|
-
timeout,
|
|
539
|
-
metadata,
|
|
540
|
-
_registered_method=True)
|
|
541
|
-
|
|
542
|
-
@staticmethod
|
|
543
|
-
def RefreshTimeout(request,
|
|
544
|
-
target,
|
|
545
|
-
options=(),
|
|
546
|
-
channel_credentials=None,
|
|
547
|
-
call_credentials=None,
|
|
548
|
-
insecure=False,
|
|
549
|
-
compression=None,
|
|
550
|
-
wait_for_ready=None,
|
|
551
|
-
timeout=None,
|
|
552
|
-
metadata=None):
|
|
553
|
-
return grpc.experimental.unary_unary(
|
|
554
|
-
request,
|
|
555
|
-
target,
|
|
556
|
-
'/Dispatcher/RefreshTimeout',
|
|
557
|
-
dispatcher__pb2.RefreshTimeoutRequest.SerializeToString,
|
|
558
|
-
dispatcher__pb2.RefreshTimeoutResponse.FromString,
|
|
559
|
-
options,
|
|
560
|
-
channel_credentials,
|
|
561
|
-
insecure,
|
|
562
|
-
call_credentials,
|
|
563
|
-
compression,
|
|
564
|
-
wait_for_ready,
|
|
565
|
-
timeout,
|
|
566
|
-
metadata,
|
|
567
|
-
_registered_method=True)
|
|
568
|
-
|
|
569
|
-
@staticmethod
|
|
570
|
-
def ReleaseSlot(request,
|
|
571
|
-
target,
|
|
572
|
-
options=(),
|
|
573
|
-
channel_credentials=None,
|
|
574
|
-
call_credentials=None,
|
|
575
|
-
insecure=False,
|
|
576
|
-
compression=None,
|
|
577
|
-
wait_for_ready=None,
|
|
578
|
-
timeout=None,
|
|
579
|
-
metadata=None):
|
|
580
|
-
return grpc.experimental.unary_unary(
|
|
581
|
-
request,
|
|
582
|
-
target,
|
|
583
|
-
'/Dispatcher/ReleaseSlot',
|
|
584
|
-
dispatcher__pb2.ReleaseSlotRequest.SerializeToString,
|
|
585
|
-
dispatcher__pb2.ReleaseSlotResponse.FromString,
|
|
586
|
-
options,
|
|
587
|
-
channel_credentials,
|
|
588
|
-
insecure,
|
|
589
|
-
call_credentials,
|
|
590
|
-
compression,
|
|
591
|
-
wait_for_ready,
|
|
592
|
-
timeout,
|
|
593
|
-
metadata,
|
|
594
|
-
_registered_method=True)
|
|
595
|
-
|
|
596
|
-
@staticmethod
|
|
597
|
-
def UpsertWorkerLabels(request,
|
|
598
|
-
target,
|
|
599
|
-
options=(),
|
|
600
|
-
channel_credentials=None,
|
|
601
|
-
call_credentials=None,
|
|
602
|
-
insecure=False,
|
|
603
|
-
compression=None,
|
|
604
|
-
wait_for_ready=None,
|
|
605
|
-
timeout=None,
|
|
606
|
-
metadata=None):
|
|
607
|
-
return grpc.experimental.unary_unary(
|
|
608
|
-
request,
|
|
609
|
-
target,
|
|
610
|
-
'/Dispatcher/UpsertWorkerLabels',
|
|
611
|
-
dispatcher__pb2.UpsertWorkerLabelsRequest.SerializeToString,
|
|
612
|
-
dispatcher__pb2.UpsertWorkerLabelsResponse.FromString,
|
|
613
|
-
options,
|
|
614
|
-
channel_credentials,
|
|
615
|
-
insecure,
|
|
616
|
-
call_credentials,
|
|
617
|
-
compression,
|
|
618
|
-
wait_for_ready,
|
|
619
|
-
timeout,
|
|
620
|
-
metadata,
|
|
621
|
-
_registered_method=True)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# source: events.proto
|
|
4
|
-
# Protobuf Python Version: 5.26.1
|
|
5
|
-
"""Generated protocol buffer code."""
|
|
6
|
-
from google.protobuf import descriptor as _descriptor
|
|
7
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
-
from google.protobuf.internal import builder as _builder
|
|
10
|
-
# @@protoc_insertion_point(imports)
|
|
11
|
-
|
|
12
|
-
_sym_db = _symbol_database.Default()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x65vents.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb4\x01\n\x05\x45vent\x12\x10\n\x08tenantId\x18\x01 \x01(\t\x12\x0f\n\x07\x65ventId\x18\x02 \x01(\t\x12\x0b\n\x03key\x18\x03 \x01(\t\x12\x0f\n\x07payload\x18\x04 \x01(\t\x12\x32\n\x0e\x65ventTimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x12\x61\x64\x64itionalMetadata\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x15\n\x13_additionalMetadata\" \n\x06\x45vents\x12\x16\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x06.Event\"\x92\x01\n\rPutLogRequest\x12\x11\n\tstepRunId\x18\x01 \x01(\t\x12-\n\tcreatedAt\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x12\n\x05level\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08metadata\x18\x05 \x01(\tB\x08\n\x06_level\"\x10\n\x0ePutLogResponse\"|\n\x15PutStreamEventRequest\x12\x11\n\tstepRunId\x18\x01 \x01(\t\x12-\n\tcreatedAt\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07message\x18\x03 \x01(\x0c\x12\x10\n\x08metadata\x18\x05 \x01(\t\"\x18\n\x16PutStreamEventResponse\"9\n\x14\x42ulkPushEventRequest\x12!\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x11.PushEventRequest\"\x9c\x01\n\x10PushEventRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12\x32\n\x0e\x65ventTimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x12\x61\x64\x64itionalMetadata\x18\x04 \x01(\tH\x00\x88\x01\x01\x42\x15\n\x13_additionalMetadata\"%\n\x12ReplayEventRequest\x12\x0f\n\x07\x65ventId\x18\x01 \x01(\t2\x88\x02\n\rEventsService\x12#\n\x04Push\x12\x11.PushEventRequest\x1a\x06.Event\"\x00\x12,\n\x08\x42ulkPush\x12\x15.BulkPushEventRequest\x1a\x07.Events\"\x00\x12\x32\n\x11ReplaySingleEvent\x12\x13.ReplayEventRequest\x1a\x06.Event\"\x00\x12+\n\x06PutLog\x12\x0e.PutLogRequest\x1a\x0f.PutLogResponse\"\x00\x12\x43\n\x0ePutStreamEvent\x12\x16.PutStreamEventRequest\x1a\x17.PutStreamEventResponse\"\x00\x42GZEgithub.com/hatchet-dev/hatchet/internal/services/dispatcher/contractsb\x06proto3')
|
|
19
|
-
|
|
20
|
-
_globals = globals()
|
|
21
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'events_pb2', _globals)
|
|
23
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
24
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
|
25
|
-
_globals['DESCRIPTOR']._serialized_options = b'ZEgithub.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts'
|
|
26
|
-
_globals['_EVENT']._serialized_start=50
|
|
27
|
-
_globals['_EVENT']._serialized_end=230
|
|
28
|
-
_globals['_EVENTS']._serialized_start=232
|
|
29
|
-
_globals['_EVENTS']._serialized_end=264
|
|
30
|
-
_globals['_PUTLOGREQUEST']._serialized_start=267
|
|
31
|
-
_globals['_PUTLOGREQUEST']._serialized_end=413
|
|
32
|
-
_globals['_PUTLOGRESPONSE']._serialized_start=415
|
|
33
|
-
_globals['_PUTLOGRESPONSE']._serialized_end=431
|
|
34
|
-
_globals['_PUTSTREAMEVENTREQUEST']._serialized_start=433
|
|
35
|
-
_globals['_PUTSTREAMEVENTREQUEST']._serialized_end=557
|
|
36
|
-
_globals['_PUTSTREAMEVENTRESPONSE']._serialized_start=559
|
|
37
|
-
_globals['_PUTSTREAMEVENTRESPONSE']._serialized_end=583
|
|
38
|
-
_globals['_BULKPUSHEVENTREQUEST']._serialized_start=585
|
|
39
|
-
_globals['_BULKPUSHEVENTREQUEST']._serialized_end=642
|
|
40
|
-
_globals['_PUSHEVENTREQUEST']._serialized_start=645
|
|
41
|
-
_globals['_PUSHEVENTREQUEST']._serialized_end=801
|
|
42
|
-
_globals['_REPLAYEVENTREQUEST']._serialized_start=803
|
|
43
|
-
_globals['_REPLAYEVENTREQUEST']._serialized_end=840
|
|
44
|
-
_globals['_EVENTSSERVICE']._serialized_start=843
|
|
45
|
-
_globals['_EVENTSSERVICE']._serialized_end=1107
|
|
46
|
-
# @@protoc_insertion_point(module_scope)
|