queueflow 0.1.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.
- queueflow/__init__.py +80 -0
- queueflow/api/__init__.py +11 -0
- queueflow/api/cron_api.py +1808 -0
- queueflow/api/dlq_api.py +996 -0
- queueflow/api/health_api.py +527 -0
- queueflow/api/jobs_api.py +1830 -0
- queueflow/api/system_api.py +523 -0
- queueflow/api/worker_api.py +1229 -0
- queueflow/api/workflows_api.py +1804 -0
- queueflow/api_client.py +797 -0
- queueflow/api_response.py +21 -0
- queueflow/configuration.py +579 -0
- queueflow/exceptions.py +199 -0
- queueflow/facade.py +255 -0
- queueflow/models/__init__.py +57 -0
- queueflow/models/backoff_strategy.py +38 -0
- queueflow/models/complete_job_request.py +89 -0
- queueflow/models/create_batch_jobs_request.py +95 -0
- queueflow/models/create_batch_jobs_response.py +90 -0
- queueflow/models/create_cron_request.py +111 -0
- queueflow/models/create_cron_response.py +87 -0
- queueflow/models/create_job_request.py +108 -0
- queueflow/models/create_job_response.py +87 -0
- queueflow/models/create_workflow_request.py +101 -0
- queueflow/models/create_workflow_response.py +87 -0
- queueflow/models/cron_schedule.py +134 -0
- queueflow/models/dead_letter.py +136 -0
- queueflow/models/error_body.py +90 -0
- queueflow/models/fail_job_request.py +91 -0
- queueflow/models/health_status.py +92 -0
- queueflow/models/heartbeat_request.py +90 -0
- queueflow/models/heartbeat_response.py +88 -0
- queueflow/models/job.py +172 -0
- queueflow/models/job_config.py +106 -0
- queueflow/models/job_config_request.py +143 -0
- queueflow/models/job_status.py +41 -0
- queueflow/models/lease_jobs_request.py +107 -0
- queueflow/models/lease_jobs_response.py +95 -0
- queueflow/models/leased_job.py +93 -0
- queueflow/models/list_crons_response.py +115 -0
- queueflow/models/list_dead_letters_response.py +115 -0
- queueflow/models/list_jobs_response.py +115 -0
- queueflow/models/list_workflows_response.py +115 -0
- queueflow/models/on_failure.py +38 -0
- queueflow/models/on_success.py +36 -0
- queueflow/models/ready_status.py +87 -0
- queueflow/models/replay_dead_letter_response.py +87 -0
- queueflow/models/stats_snapshot.py +102 -0
- queueflow/models/step_status.py +41 -0
- queueflow/models/tasks_response.py +87 -0
- queueflow/models/workflow.py +130 -0
- queueflow/models/workflow_diagram_response.py +89 -0
- queueflow/models/workflow_status.py +41 -0
- queueflow/models/workflow_step.py +112 -0
- queueflow/models/workflow_step_state.py +97 -0
- queueflow/models/workflow_step_states_response.py +95 -0
- queueflow/py.typed +0 -0
- queueflow/rest.py +257 -0
- queueflow-0.1.0.dist-info/METADATA +26 -0
- queueflow-0.1.0.dist-info/RECORD +62 -0
- queueflow-0.1.0.dist-info/WHEEL +5 -0
- queueflow-0.1.0.dist-info/top_level.txt +1 -0
queueflow/api/dlq_api.py
ADDED
|
@@ -0,0 +1,996 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
QueueFlow API
|
|
5
|
+
|
|
6
|
+
REST API for QueueFlow, a PostgreSQL-native distributed job queue and workflow engine.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from datetime import datetime
|
|
20
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from queueflow.models.dead_letter import DeadLetter
|
|
24
|
+
from queueflow.models.list_dead_letters_response import ListDeadLettersResponse
|
|
25
|
+
from queueflow.models.replay_dead_letter_response import ReplayDeadLetterResponse
|
|
26
|
+
|
|
27
|
+
from queueflow.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from queueflow.api_response import ApiResponse
|
|
29
|
+
from queueflow.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class DlqApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
def get_dead_letter(
|
|
47
|
+
self,
|
|
48
|
+
id: Annotated[StrictInt, Field(description="Dead letter id")],
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> DeadLetter:
|
|
62
|
+
"""get_dead_letter
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
:param id: Dead letter id (required)
|
|
66
|
+
:type id: int
|
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
68
|
+
number provided, it will be total request
|
|
69
|
+
timeout. It can also be a pair (tuple) of
|
|
70
|
+
(connection, read) timeouts.
|
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
73
|
+
request; this effectively ignores the
|
|
74
|
+
authentication in the spec for a single request.
|
|
75
|
+
:type _request_auth: dict, optional
|
|
76
|
+
:param _content_type: force content-type for the request.
|
|
77
|
+
:type _content_type: str, Optional
|
|
78
|
+
:param _headers: set to override the headers for a single
|
|
79
|
+
request; this effectively ignores the headers
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _headers: dict, optional
|
|
82
|
+
:param _host_index: set to override the host_index for a single
|
|
83
|
+
request; this effectively ignores the host_index
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _host_index: int, optional
|
|
86
|
+
:return: Returns the result object.
|
|
87
|
+
""" # noqa: E501
|
|
88
|
+
|
|
89
|
+
_param = self._get_dead_letter_serialize(
|
|
90
|
+
id=id,
|
|
91
|
+
_request_auth=_request_auth,
|
|
92
|
+
_content_type=_content_type,
|
|
93
|
+
_headers=_headers,
|
|
94
|
+
_host_index=_host_index
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
+
'200': "DeadLetter",
|
|
99
|
+
'401': "ErrorBody",
|
|
100
|
+
'403': "ErrorBody",
|
|
101
|
+
'404': "ErrorBody",
|
|
102
|
+
}
|
|
103
|
+
response_data = self.api_client.call_api(
|
|
104
|
+
*_param,
|
|
105
|
+
_request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@validate_call
|
|
115
|
+
def get_dead_letter_with_http_info(
|
|
116
|
+
self,
|
|
117
|
+
id: Annotated[StrictInt, Field(description="Dead letter id")],
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[DeadLetter]:
|
|
131
|
+
"""get_dead_letter
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:param id: Dead letter id (required)
|
|
135
|
+
:type id: int
|
|
136
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
137
|
+
number provided, it will be total request
|
|
138
|
+
timeout. It can also be a pair (tuple) of
|
|
139
|
+
(connection, read) timeouts.
|
|
140
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
142
|
+
request; this effectively ignores the
|
|
143
|
+
authentication in the spec for a single request.
|
|
144
|
+
:type _request_auth: dict, optional
|
|
145
|
+
:param _content_type: force content-type for the request.
|
|
146
|
+
:type _content_type: str, Optional
|
|
147
|
+
:param _headers: set to override the headers for a single
|
|
148
|
+
request; this effectively ignores the headers
|
|
149
|
+
in the spec for a single request.
|
|
150
|
+
:type _headers: dict, optional
|
|
151
|
+
:param _host_index: set to override the host_index for a single
|
|
152
|
+
request; this effectively ignores the host_index
|
|
153
|
+
in the spec for a single request.
|
|
154
|
+
:type _host_index: int, optional
|
|
155
|
+
:return: Returns the result object.
|
|
156
|
+
""" # noqa: E501
|
|
157
|
+
|
|
158
|
+
_param = self._get_dead_letter_serialize(
|
|
159
|
+
id=id,
|
|
160
|
+
_request_auth=_request_auth,
|
|
161
|
+
_content_type=_content_type,
|
|
162
|
+
_headers=_headers,
|
|
163
|
+
_host_index=_host_index
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
167
|
+
'200': "DeadLetter",
|
|
168
|
+
'401': "ErrorBody",
|
|
169
|
+
'403': "ErrorBody",
|
|
170
|
+
'404': "ErrorBody",
|
|
171
|
+
}
|
|
172
|
+
response_data = self.api_client.call_api(
|
|
173
|
+
*_param,
|
|
174
|
+
_request_timeout=_request_timeout
|
|
175
|
+
)
|
|
176
|
+
response_data.read()
|
|
177
|
+
return self.api_client.response_deserialize(
|
|
178
|
+
response_data=response_data,
|
|
179
|
+
response_types_map=_response_types_map,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@validate_call
|
|
184
|
+
def get_dead_letter_without_preload_content(
|
|
185
|
+
self,
|
|
186
|
+
id: Annotated[StrictInt, Field(description="Dead letter id")],
|
|
187
|
+
_request_timeout: Union[
|
|
188
|
+
None,
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Tuple[
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
193
|
+
]
|
|
194
|
+
] = None,
|
|
195
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_content_type: Optional[StrictStr] = None,
|
|
197
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
199
|
+
) -> RESTResponseType:
|
|
200
|
+
"""get_dead_letter
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
:param id: Dead letter id (required)
|
|
204
|
+
:type id: int
|
|
205
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
206
|
+
number provided, it will be total request
|
|
207
|
+
timeout. It can also be a pair (tuple) of
|
|
208
|
+
(connection, read) timeouts.
|
|
209
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
210
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
211
|
+
request; this effectively ignores the
|
|
212
|
+
authentication in the spec for a single request.
|
|
213
|
+
:type _request_auth: dict, optional
|
|
214
|
+
:param _content_type: force content-type for the request.
|
|
215
|
+
:type _content_type: str, Optional
|
|
216
|
+
:param _headers: set to override the headers for a single
|
|
217
|
+
request; this effectively ignores the headers
|
|
218
|
+
in the spec for a single request.
|
|
219
|
+
:type _headers: dict, optional
|
|
220
|
+
:param _host_index: set to override the host_index for a single
|
|
221
|
+
request; this effectively ignores the host_index
|
|
222
|
+
in the spec for a single request.
|
|
223
|
+
:type _host_index: int, optional
|
|
224
|
+
:return: Returns the result object.
|
|
225
|
+
""" # noqa: E501
|
|
226
|
+
|
|
227
|
+
_param = self._get_dead_letter_serialize(
|
|
228
|
+
id=id,
|
|
229
|
+
_request_auth=_request_auth,
|
|
230
|
+
_content_type=_content_type,
|
|
231
|
+
_headers=_headers,
|
|
232
|
+
_host_index=_host_index
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
236
|
+
'200': "DeadLetter",
|
|
237
|
+
'401': "ErrorBody",
|
|
238
|
+
'403': "ErrorBody",
|
|
239
|
+
'404': "ErrorBody",
|
|
240
|
+
}
|
|
241
|
+
response_data = self.api_client.call_api(
|
|
242
|
+
*_param,
|
|
243
|
+
_request_timeout=_request_timeout
|
|
244
|
+
)
|
|
245
|
+
return response_data.response
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _get_dead_letter_serialize(
|
|
249
|
+
self,
|
|
250
|
+
id,
|
|
251
|
+
_request_auth,
|
|
252
|
+
_content_type,
|
|
253
|
+
_headers,
|
|
254
|
+
_host_index,
|
|
255
|
+
) -> RequestSerialized:
|
|
256
|
+
|
|
257
|
+
_host = None
|
|
258
|
+
|
|
259
|
+
_collection_formats: Dict[str, str] = {
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
_path_params: Dict[str, str] = {}
|
|
263
|
+
_query_params: List[Tuple[str, str]] = []
|
|
264
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
265
|
+
_form_params: List[Tuple[str, str]] = []
|
|
266
|
+
_files: Dict[
|
|
267
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
268
|
+
] = {}
|
|
269
|
+
_body_params: Optional[bytes] = None
|
|
270
|
+
|
|
271
|
+
# process the path parameters
|
|
272
|
+
if id is not None:
|
|
273
|
+
_path_params['id'] = id
|
|
274
|
+
# process the query parameters
|
|
275
|
+
# process the header parameters
|
|
276
|
+
# process the form parameters
|
|
277
|
+
# process the body parameter
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# set the HTTP header `Accept`
|
|
281
|
+
if 'Accept' not in _header_params:
|
|
282
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
283
|
+
[
|
|
284
|
+
'application/json'
|
|
285
|
+
]
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
# authentication setting
|
|
290
|
+
_auth_settings: List[str] = [
|
|
291
|
+
'bearerAuth'
|
|
292
|
+
]
|
|
293
|
+
|
|
294
|
+
return self.api_client.param_serialize(
|
|
295
|
+
method='GET',
|
|
296
|
+
resource_path='/api/v1/dlq/{id}',
|
|
297
|
+
path_params=_path_params,
|
|
298
|
+
query_params=_query_params,
|
|
299
|
+
header_params=_header_params,
|
|
300
|
+
body=_body_params,
|
|
301
|
+
post_params=_form_params,
|
|
302
|
+
files=_files,
|
|
303
|
+
auth_settings=_auth_settings,
|
|
304
|
+
collection_formats=_collection_formats,
|
|
305
|
+
_host=_host,
|
|
306
|
+
_request_auth=_request_auth
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
@validate_call
|
|
313
|
+
def list_dead_letters(
|
|
314
|
+
self,
|
|
315
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (e.g. `pending`, `completed`).")] = None,
|
|
316
|
+
queue: Annotated[Optional[StrictStr], Field(description="Filter by queue name (jobs only).")] = None,
|
|
317
|
+
limit: Annotated[Optional[StrictInt], Field(description="Page size, 1..=100 (default 50).")] = None,
|
|
318
|
+
offset: Annotated[Optional[StrictInt], Field(description="Number of records to skip (default 0).")] = None,
|
|
319
|
+
order_by: Annotated[Optional[StrictStr], Field(description="`created_at ASC` or `created_at DESC` (default DESC).")] = None,
|
|
320
|
+
include_total: Annotated[Optional[StrictBool], Field(description="Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).")] = None,
|
|
321
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.")] = None,
|
|
322
|
+
created_after: Annotated[Optional[datetime], Field(description="Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.")] = None,
|
|
323
|
+
created_before: Annotated[Optional[datetime], Field(description="Only rows created strictly before this instant (RFC 3339, exclusive).")] = None,
|
|
324
|
+
_request_timeout: Union[
|
|
325
|
+
None,
|
|
326
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
327
|
+
Tuple[
|
|
328
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
329
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
330
|
+
]
|
|
331
|
+
] = None,
|
|
332
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
333
|
+
_content_type: Optional[StrictStr] = None,
|
|
334
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
335
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
336
|
+
) -> ListDeadLettersResponse:
|
|
337
|
+
"""list_dead_letters
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
:param status: Filter by status (e.g. `pending`, `completed`).
|
|
341
|
+
:type status: str
|
|
342
|
+
:param queue: Filter by queue name (jobs only).
|
|
343
|
+
:type queue: str
|
|
344
|
+
:param limit: Page size, 1..=100 (default 50).
|
|
345
|
+
:type limit: int
|
|
346
|
+
:param offset: Number of records to skip (default 0).
|
|
347
|
+
:type offset: int
|
|
348
|
+
:param order_by: `created_at ASC` or `created_at DESC` (default DESC).
|
|
349
|
+
:type order_by: str
|
|
350
|
+
:param include_total: Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).
|
|
351
|
+
:type include_total: bool
|
|
352
|
+
:param cursor: Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.
|
|
353
|
+
:type cursor: str
|
|
354
|
+
:param created_after: Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.
|
|
355
|
+
:type created_after: datetime
|
|
356
|
+
:param created_before: Only rows created strictly before this instant (RFC 3339, exclusive).
|
|
357
|
+
:type created_before: datetime
|
|
358
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
359
|
+
number provided, it will be total request
|
|
360
|
+
timeout. It can also be a pair (tuple) of
|
|
361
|
+
(connection, read) timeouts.
|
|
362
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
363
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
364
|
+
request; this effectively ignores the
|
|
365
|
+
authentication in the spec for a single request.
|
|
366
|
+
:type _request_auth: dict, optional
|
|
367
|
+
:param _content_type: force content-type for the request.
|
|
368
|
+
:type _content_type: str, Optional
|
|
369
|
+
:param _headers: set to override the headers for a single
|
|
370
|
+
request; this effectively ignores the headers
|
|
371
|
+
in the spec for a single request.
|
|
372
|
+
:type _headers: dict, optional
|
|
373
|
+
:param _host_index: set to override the host_index for a single
|
|
374
|
+
request; this effectively ignores the host_index
|
|
375
|
+
in the spec for a single request.
|
|
376
|
+
:type _host_index: int, optional
|
|
377
|
+
:return: Returns the result object.
|
|
378
|
+
""" # noqa: E501
|
|
379
|
+
|
|
380
|
+
_param = self._list_dead_letters_serialize(
|
|
381
|
+
status=status,
|
|
382
|
+
queue=queue,
|
|
383
|
+
limit=limit,
|
|
384
|
+
offset=offset,
|
|
385
|
+
order_by=order_by,
|
|
386
|
+
include_total=include_total,
|
|
387
|
+
cursor=cursor,
|
|
388
|
+
created_after=created_after,
|
|
389
|
+
created_before=created_before,
|
|
390
|
+
_request_auth=_request_auth,
|
|
391
|
+
_content_type=_content_type,
|
|
392
|
+
_headers=_headers,
|
|
393
|
+
_host_index=_host_index
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
397
|
+
'200': "ListDeadLettersResponse",
|
|
398
|
+
'401': "ErrorBody",
|
|
399
|
+
}
|
|
400
|
+
response_data = self.api_client.call_api(
|
|
401
|
+
*_param,
|
|
402
|
+
_request_timeout=_request_timeout
|
|
403
|
+
)
|
|
404
|
+
response_data.read()
|
|
405
|
+
return self.api_client.response_deserialize(
|
|
406
|
+
response_data=response_data,
|
|
407
|
+
response_types_map=_response_types_map,
|
|
408
|
+
).data
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
@validate_call
|
|
412
|
+
def list_dead_letters_with_http_info(
|
|
413
|
+
self,
|
|
414
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (e.g. `pending`, `completed`).")] = None,
|
|
415
|
+
queue: Annotated[Optional[StrictStr], Field(description="Filter by queue name (jobs only).")] = None,
|
|
416
|
+
limit: Annotated[Optional[StrictInt], Field(description="Page size, 1..=100 (default 50).")] = None,
|
|
417
|
+
offset: Annotated[Optional[StrictInt], Field(description="Number of records to skip (default 0).")] = None,
|
|
418
|
+
order_by: Annotated[Optional[StrictStr], Field(description="`created_at ASC` or `created_at DESC` (default DESC).")] = None,
|
|
419
|
+
include_total: Annotated[Optional[StrictBool], Field(description="Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).")] = None,
|
|
420
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.")] = None,
|
|
421
|
+
created_after: Annotated[Optional[datetime], Field(description="Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.")] = None,
|
|
422
|
+
created_before: Annotated[Optional[datetime], Field(description="Only rows created strictly before this instant (RFC 3339, exclusive).")] = None,
|
|
423
|
+
_request_timeout: Union[
|
|
424
|
+
None,
|
|
425
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
426
|
+
Tuple[
|
|
427
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
428
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
429
|
+
]
|
|
430
|
+
] = None,
|
|
431
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
432
|
+
_content_type: Optional[StrictStr] = None,
|
|
433
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
434
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
435
|
+
) -> ApiResponse[ListDeadLettersResponse]:
|
|
436
|
+
"""list_dead_letters
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
:param status: Filter by status (e.g. `pending`, `completed`).
|
|
440
|
+
:type status: str
|
|
441
|
+
:param queue: Filter by queue name (jobs only).
|
|
442
|
+
:type queue: str
|
|
443
|
+
:param limit: Page size, 1..=100 (default 50).
|
|
444
|
+
:type limit: int
|
|
445
|
+
:param offset: Number of records to skip (default 0).
|
|
446
|
+
:type offset: int
|
|
447
|
+
:param order_by: `created_at ASC` or `created_at DESC` (default DESC).
|
|
448
|
+
:type order_by: str
|
|
449
|
+
:param include_total: Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).
|
|
450
|
+
:type include_total: bool
|
|
451
|
+
:param cursor: Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.
|
|
452
|
+
:type cursor: str
|
|
453
|
+
:param created_after: Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.
|
|
454
|
+
:type created_after: datetime
|
|
455
|
+
:param created_before: Only rows created strictly before this instant (RFC 3339, exclusive).
|
|
456
|
+
:type created_before: datetime
|
|
457
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
458
|
+
number provided, it will be total request
|
|
459
|
+
timeout. It can also be a pair (tuple) of
|
|
460
|
+
(connection, read) timeouts.
|
|
461
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
462
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
463
|
+
request; this effectively ignores the
|
|
464
|
+
authentication in the spec for a single request.
|
|
465
|
+
:type _request_auth: dict, optional
|
|
466
|
+
:param _content_type: force content-type for the request.
|
|
467
|
+
:type _content_type: str, Optional
|
|
468
|
+
:param _headers: set to override the headers for a single
|
|
469
|
+
request; this effectively ignores the headers
|
|
470
|
+
in the spec for a single request.
|
|
471
|
+
:type _headers: dict, optional
|
|
472
|
+
:param _host_index: set to override the host_index for a single
|
|
473
|
+
request; this effectively ignores the host_index
|
|
474
|
+
in the spec for a single request.
|
|
475
|
+
:type _host_index: int, optional
|
|
476
|
+
:return: Returns the result object.
|
|
477
|
+
""" # noqa: E501
|
|
478
|
+
|
|
479
|
+
_param = self._list_dead_letters_serialize(
|
|
480
|
+
status=status,
|
|
481
|
+
queue=queue,
|
|
482
|
+
limit=limit,
|
|
483
|
+
offset=offset,
|
|
484
|
+
order_by=order_by,
|
|
485
|
+
include_total=include_total,
|
|
486
|
+
cursor=cursor,
|
|
487
|
+
created_after=created_after,
|
|
488
|
+
created_before=created_before,
|
|
489
|
+
_request_auth=_request_auth,
|
|
490
|
+
_content_type=_content_type,
|
|
491
|
+
_headers=_headers,
|
|
492
|
+
_host_index=_host_index
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
496
|
+
'200': "ListDeadLettersResponse",
|
|
497
|
+
'401': "ErrorBody",
|
|
498
|
+
}
|
|
499
|
+
response_data = self.api_client.call_api(
|
|
500
|
+
*_param,
|
|
501
|
+
_request_timeout=_request_timeout
|
|
502
|
+
)
|
|
503
|
+
response_data.read()
|
|
504
|
+
return self.api_client.response_deserialize(
|
|
505
|
+
response_data=response_data,
|
|
506
|
+
response_types_map=_response_types_map,
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
@validate_call
|
|
511
|
+
def list_dead_letters_without_preload_content(
|
|
512
|
+
self,
|
|
513
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (e.g. `pending`, `completed`).")] = None,
|
|
514
|
+
queue: Annotated[Optional[StrictStr], Field(description="Filter by queue name (jobs only).")] = None,
|
|
515
|
+
limit: Annotated[Optional[StrictInt], Field(description="Page size, 1..=100 (default 50).")] = None,
|
|
516
|
+
offset: Annotated[Optional[StrictInt], Field(description="Number of records to skip (default 0).")] = None,
|
|
517
|
+
order_by: Annotated[Optional[StrictStr], Field(description="`created_at ASC` or `created_at DESC` (default DESC).")] = None,
|
|
518
|
+
include_total: Annotated[Optional[StrictBool], Field(description="Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).")] = None,
|
|
519
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.")] = None,
|
|
520
|
+
created_after: Annotated[Optional[datetime], Field(description="Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.")] = None,
|
|
521
|
+
created_before: Annotated[Optional[datetime], Field(description="Only rows created strictly before this instant (RFC 3339, exclusive).")] = None,
|
|
522
|
+
_request_timeout: Union[
|
|
523
|
+
None,
|
|
524
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
525
|
+
Tuple[
|
|
526
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
527
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
528
|
+
]
|
|
529
|
+
] = None,
|
|
530
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
531
|
+
_content_type: Optional[StrictStr] = None,
|
|
532
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
533
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
534
|
+
) -> RESTResponseType:
|
|
535
|
+
"""list_dead_letters
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
:param status: Filter by status (e.g. `pending`, `completed`).
|
|
539
|
+
:type status: str
|
|
540
|
+
:param queue: Filter by queue name (jobs only).
|
|
541
|
+
:type queue: str
|
|
542
|
+
:param limit: Page size, 1..=100 (default 50).
|
|
543
|
+
:type limit: int
|
|
544
|
+
:param offset: Number of records to skip (default 0).
|
|
545
|
+
:type offset: int
|
|
546
|
+
:param order_by: `created_at ASC` or `created_at DESC` (default DESC).
|
|
547
|
+
:type order_by: str
|
|
548
|
+
:param include_total: Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).
|
|
549
|
+
:type include_total: bool
|
|
550
|
+
:param cursor: Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.
|
|
551
|
+
:type cursor: str
|
|
552
|
+
:param created_after: Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.
|
|
553
|
+
:type created_after: datetime
|
|
554
|
+
:param created_before: Only rows created strictly before this instant (RFC 3339, exclusive).
|
|
555
|
+
:type created_before: datetime
|
|
556
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
557
|
+
number provided, it will be total request
|
|
558
|
+
timeout. It can also be a pair (tuple) of
|
|
559
|
+
(connection, read) timeouts.
|
|
560
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
561
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
562
|
+
request; this effectively ignores the
|
|
563
|
+
authentication in the spec for a single request.
|
|
564
|
+
:type _request_auth: dict, optional
|
|
565
|
+
:param _content_type: force content-type for the request.
|
|
566
|
+
:type _content_type: str, Optional
|
|
567
|
+
:param _headers: set to override the headers for a single
|
|
568
|
+
request; this effectively ignores the headers
|
|
569
|
+
in the spec for a single request.
|
|
570
|
+
:type _headers: dict, optional
|
|
571
|
+
:param _host_index: set to override the host_index for a single
|
|
572
|
+
request; this effectively ignores the host_index
|
|
573
|
+
in the spec for a single request.
|
|
574
|
+
:type _host_index: int, optional
|
|
575
|
+
:return: Returns the result object.
|
|
576
|
+
""" # noqa: E501
|
|
577
|
+
|
|
578
|
+
_param = self._list_dead_letters_serialize(
|
|
579
|
+
status=status,
|
|
580
|
+
queue=queue,
|
|
581
|
+
limit=limit,
|
|
582
|
+
offset=offset,
|
|
583
|
+
order_by=order_by,
|
|
584
|
+
include_total=include_total,
|
|
585
|
+
cursor=cursor,
|
|
586
|
+
created_after=created_after,
|
|
587
|
+
created_before=created_before,
|
|
588
|
+
_request_auth=_request_auth,
|
|
589
|
+
_content_type=_content_type,
|
|
590
|
+
_headers=_headers,
|
|
591
|
+
_host_index=_host_index
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
595
|
+
'200': "ListDeadLettersResponse",
|
|
596
|
+
'401': "ErrorBody",
|
|
597
|
+
}
|
|
598
|
+
response_data = self.api_client.call_api(
|
|
599
|
+
*_param,
|
|
600
|
+
_request_timeout=_request_timeout
|
|
601
|
+
)
|
|
602
|
+
return response_data.response
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
def _list_dead_letters_serialize(
|
|
606
|
+
self,
|
|
607
|
+
status,
|
|
608
|
+
queue,
|
|
609
|
+
limit,
|
|
610
|
+
offset,
|
|
611
|
+
order_by,
|
|
612
|
+
include_total,
|
|
613
|
+
cursor,
|
|
614
|
+
created_after,
|
|
615
|
+
created_before,
|
|
616
|
+
_request_auth,
|
|
617
|
+
_content_type,
|
|
618
|
+
_headers,
|
|
619
|
+
_host_index,
|
|
620
|
+
) -> RequestSerialized:
|
|
621
|
+
|
|
622
|
+
_host = None
|
|
623
|
+
|
|
624
|
+
_collection_formats: Dict[str, str] = {
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
_path_params: Dict[str, str] = {}
|
|
628
|
+
_query_params: List[Tuple[str, str]] = []
|
|
629
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
630
|
+
_form_params: List[Tuple[str, str]] = []
|
|
631
|
+
_files: Dict[
|
|
632
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
633
|
+
] = {}
|
|
634
|
+
_body_params: Optional[bytes] = None
|
|
635
|
+
|
|
636
|
+
# process the path parameters
|
|
637
|
+
# process the query parameters
|
|
638
|
+
if status is not None:
|
|
639
|
+
|
|
640
|
+
_query_params.append(('status', status))
|
|
641
|
+
|
|
642
|
+
if queue is not None:
|
|
643
|
+
|
|
644
|
+
_query_params.append(('queue', queue))
|
|
645
|
+
|
|
646
|
+
if limit is not None:
|
|
647
|
+
|
|
648
|
+
_query_params.append(('limit', limit))
|
|
649
|
+
|
|
650
|
+
if offset is not None:
|
|
651
|
+
|
|
652
|
+
_query_params.append(('offset', offset))
|
|
653
|
+
|
|
654
|
+
if order_by is not None:
|
|
655
|
+
|
|
656
|
+
_query_params.append(('order_by', order_by))
|
|
657
|
+
|
|
658
|
+
if include_total is not None:
|
|
659
|
+
|
|
660
|
+
_query_params.append(('include_total', include_total))
|
|
661
|
+
|
|
662
|
+
if cursor is not None:
|
|
663
|
+
|
|
664
|
+
_query_params.append(('cursor', cursor))
|
|
665
|
+
|
|
666
|
+
if created_after is not None:
|
|
667
|
+
if isinstance(created_after, datetime):
|
|
668
|
+
_query_params.append(
|
|
669
|
+
(
|
|
670
|
+
'created_after',
|
|
671
|
+
created_after.strftime(
|
|
672
|
+
self.api_client.configuration.datetime_format
|
|
673
|
+
)
|
|
674
|
+
)
|
|
675
|
+
)
|
|
676
|
+
else:
|
|
677
|
+
_query_params.append(('created_after', created_after))
|
|
678
|
+
|
|
679
|
+
if created_before is not None:
|
|
680
|
+
if isinstance(created_before, datetime):
|
|
681
|
+
_query_params.append(
|
|
682
|
+
(
|
|
683
|
+
'created_before',
|
|
684
|
+
created_before.strftime(
|
|
685
|
+
self.api_client.configuration.datetime_format
|
|
686
|
+
)
|
|
687
|
+
)
|
|
688
|
+
)
|
|
689
|
+
else:
|
|
690
|
+
_query_params.append(('created_before', created_before))
|
|
691
|
+
|
|
692
|
+
# process the header parameters
|
|
693
|
+
# process the form parameters
|
|
694
|
+
# process the body parameter
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
# set the HTTP header `Accept`
|
|
698
|
+
if 'Accept' not in _header_params:
|
|
699
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
700
|
+
[
|
|
701
|
+
'application/json'
|
|
702
|
+
]
|
|
703
|
+
)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
# authentication setting
|
|
707
|
+
_auth_settings: List[str] = [
|
|
708
|
+
'bearerAuth'
|
|
709
|
+
]
|
|
710
|
+
|
|
711
|
+
return self.api_client.param_serialize(
|
|
712
|
+
method='GET',
|
|
713
|
+
resource_path='/api/v1/dlq',
|
|
714
|
+
path_params=_path_params,
|
|
715
|
+
query_params=_query_params,
|
|
716
|
+
header_params=_header_params,
|
|
717
|
+
body=_body_params,
|
|
718
|
+
post_params=_form_params,
|
|
719
|
+
files=_files,
|
|
720
|
+
auth_settings=_auth_settings,
|
|
721
|
+
collection_formats=_collection_formats,
|
|
722
|
+
_host=_host,
|
|
723
|
+
_request_auth=_request_auth
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
@validate_call
|
|
730
|
+
def replay_dead_letter(
|
|
731
|
+
self,
|
|
732
|
+
id: Annotated[StrictInt, Field(description="Dead letter id")],
|
|
733
|
+
_request_timeout: Union[
|
|
734
|
+
None,
|
|
735
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
736
|
+
Tuple[
|
|
737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
738
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
739
|
+
]
|
|
740
|
+
] = None,
|
|
741
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
742
|
+
_content_type: Optional[StrictStr] = None,
|
|
743
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
744
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
745
|
+
) -> ReplayDeadLetterResponse:
|
|
746
|
+
"""replay_dead_letter
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
:param id: Dead letter id (required)
|
|
750
|
+
:type id: int
|
|
751
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
752
|
+
number provided, it will be total request
|
|
753
|
+
timeout. It can also be a pair (tuple) of
|
|
754
|
+
(connection, read) timeouts.
|
|
755
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
756
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
757
|
+
request; this effectively ignores the
|
|
758
|
+
authentication in the spec for a single request.
|
|
759
|
+
:type _request_auth: dict, optional
|
|
760
|
+
:param _content_type: force content-type for the request.
|
|
761
|
+
:type _content_type: str, Optional
|
|
762
|
+
:param _headers: set to override the headers for a single
|
|
763
|
+
request; this effectively ignores the headers
|
|
764
|
+
in the spec for a single request.
|
|
765
|
+
:type _headers: dict, optional
|
|
766
|
+
:param _host_index: set to override the host_index for a single
|
|
767
|
+
request; this effectively ignores the host_index
|
|
768
|
+
in the spec for a single request.
|
|
769
|
+
:type _host_index: int, optional
|
|
770
|
+
:return: Returns the result object.
|
|
771
|
+
""" # noqa: E501
|
|
772
|
+
|
|
773
|
+
_param = self._replay_dead_letter_serialize(
|
|
774
|
+
id=id,
|
|
775
|
+
_request_auth=_request_auth,
|
|
776
|
+
_content_type=_content_type,
|
|
777
|
+
_headers=_headers,
|
|
778
|
+
_host_index=_host_index
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
782
|
+
'201': "ReplayDeadLetterResponse",
|
|
783
|
+
'401': "ErrorBody",
|
|
784
|
+
'403': "ErrorBody",
|
|
785
|
+
'404': "ErrorBody",
|
|
786
|
+
'409': "ErrorBody",
|
|
787
|
+
}
|
|
788
|
+
response_data = self.api_client.call_api(
|
|
789
|
+
*_param,
|
|
790
|
+
_request_timeout=_request_timeout
|
|
791
|
+
)
|
|
792
|
+
response_data.read()
|
|
793
|
+
return self.api_client.response_deserialize(
|
|
794
|
+
response_data=response_data,
|
|
795
|
+
response_types_map=_response_types_map,
|
|
796
|
+
).data
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
@validate_call
|
|
800
|
+
def replay_dead_letter_with_http_info(
|
|
801
|
+
self,
|
|
802
|
+
id: Annotated[StrictInt, Field(description="Dead letter id")],
|
|
803
|
+
_request_timeout: Union[
|
|
804
|
+
None,
|
|
805
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
806
|
+
Tuple[
|
|
807
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
808
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
809
|
+
]
|
|
810
|
+
] = None,
|
|
811
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
812
|
+
_content_type: Optional[StrictStr] = None,
|
|
813
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
814
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
815
|
+
) -> ApiResponse[ReplayDeadLetterResponse]:
|
|
816
|
+
"""replay_dead_letter
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
:param id: Dead letter id (required)
|
|
820
|
+
:type id: int
|
|
821
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
822
|
+
number provided, it will be total request
|
|
823
|
+
timeout. It can also be a pair (tuple) of
|
|
824
|
+
(connection, read) timeouts.
|
|
825
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
826
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
827
|
+
request; this effectively ignores the
|
|
828
|
+
authentication in the spec for a single request.
|
|
829
|
+
:type _request_auth: dict, optional
|
|
830
|
+
:param _content_type: force content-type for the request.
|
|
831
|
+
:type _content_type: str, Optional
|
|
832
|
+
:param _headers: set to override the headers for a single
|
|
833
|
+
request; this effectively ignores the headers
|
|
834
|
+
in the spec for a single request.
|
|
835
|
+
:type _headers: dict, optional
|
|
836
|
+
:param _host_index: set to override the host_index for a single
|
|
837
|
+
request; this effectively ignores the host_index
|
|
838
|
+
in the spec for a single request.
|
|
839
|
+
:type _host_index: int, optional
|
|
840
|
+
:return: Returns the result object.
|
|
841
|
+
""" # noqa: E501
|
|
842
|
+
|
|
843
|
+
_param = self._replay_dead_letter_serialize(
|
|
844
|
+
id=id,
|
|
845
|
+
_request_auth=_request_auth,
|
|
846
|
+
_content_type=_content_type,
|
|
847
|
+
_headers=_headers,
|
|
848
|
+
_host_index=_host_index
|
|
849
|
+
)
|
|
850
|
+
|
|
851
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
852
|
+
'201': "ReplayDeadLetterResponse",
|
|
853
|
+
'401': "ErrorBody",
|
|
854
|
+
'403': "ErrorBody",
|
|
855
|
+
'404': "ErrorBody",
|
|
856
|
+
'409': "ErrorBody",
|
|
857
|
+
}
|
|
858
|
+
response_data = self.api_client.call_api(
|
|
859
|
+
*_param,
|
|
860
|
+
_request_timeout=_request_timeout
|
|
861
|
+
)
|
|
862
|
+
response_data.read()
|
|
863
|
+
return self.api_client.response_deserialize(
|
|
864
|
+
response_data=response_data,
|
|
865
|
+
response_types_map=_response_types_map,
|
|
866
|
+
)
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
@validate_call
|
|
870
|
+
def replay_dead_letter_without_preload_content(
|
|
871
|
+
self,
|
|
872
|
+
id: Annotated[StrictInt, Field(description="Dead letter id")],
|
|
873
|
+
_request_timeout: Union[
|
|
874
|
+
None,
|
|
875
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
876
|
+
Tuple[
|
|
877
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
878
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
879
|
+
]
|
|
880
|
+
] = None,
|
|
881
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
882
|
+
_content_type: Optional[StrictStr] = None,
|
|
883
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
884
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
885
|
+
) -> RESTResponseType:
|
|
886
|
+
"""replay_dead_letter
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
:param id: Dead letter id (required)
|
|
890
|
+
:type id: int
|
|
891
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
892
|
+
number provided, it will be total request
|
|
893
|
+
timeout. It can also be a pair (tuple) of
|
|
894
|
+
(connection, read) timeouts.
|
|
895
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
896
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
897
|
+
request; this effectively ignores the
|
|
898
|
+
authentication in the spec for a single request.
|
|
899
|
+
:type _request_auth: dict, optional
|
|
900
|
+
:param _content_type: force content-type for the request.
|
|
901
|
+
:type _content_type: str, Optional
|
|
902
|
+
:param _headers: set to override the headers for a single
|
|
903
|
+
request; this effectively ignores the headers
|
|
904
|
+
in the spec for a single request.
|
|
905
|
+
:type _headers: dict, optional
|
|
906
|
+
:param _host_index: set to override the host_index for a single
|
|
907
|
+
request; this effectively ignores the host_index
|
|
908
|
+
in the spec for a single request.
|
|
909
|
+
:type _host_index: int, optional
|
|
910
|
+
:return: Returns the result object.
|
|
911
|
+
""" # noqa: E501
|
|
912
|
+
|
|
913
|
+
_param = self._replay_dead_letter_serialize(
|
|
914
|
+
id=id,
|
|
915
|
+
_request_auth=_request_auth,
|
|
916
|
+
_content_type=_content_type,
|
|
917
|
+
_headers=_headers,
|
|
918
|
+
_host_index=_host_index
|
|
919
|
+
)
|
|
920
|
+
|
|
921
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
922
|
+
'201': "ReplayDeadLetterResponse",
|
|
923
|
+
'401': "ErrorBody",
|
|
924
|
+
'403': "ErrorBody",
|
|
925
|
+
'404': "ErrorBody",
|
|
926
|
+
'409': "ErrorBody",
|
|
927
|
+
}
|
|
928
|
+
response_data = self.api_client.call_api(
|
|
929
|
+
*_param,
|
|
930
|
+
_request_timeout=_request_timeout
|
|
931
|
+
)
|
|
932
|
+
return response_data.response
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
def _replay_dead_letter_serialize(
|
|
936
|
+
self,
|
|
937
|
+
id,
|
|
938
|
+
_request_auth,
|
|
939
|
+
_content_type,
|
|
940
|
+
_headers,
|
|
941
|
+
_host_index,
|
|
942
|
+
) -> RequestSerialized:
|
|
943
|
+
|
|
944
|
+
_host = None
|
|
945
|
+
|
|
946
|
+
_collection_formats: Dict[str, str] = {
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
_path_params: Dict[str, str] = {}
|
|
950
|
+
_query_params: List[Tuple[str, str]] = []
|
|
951
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
952
|
+
_form_params: List[Tuple[str, str]] = []
|
|
953
|
+
_files: Dict[
|
|
954
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
955
|
+
] = {}
|
|
956
|
+
_body_params: Optional[bytes] = None
|
|
957
|
+
|
|
958
|
+
# process the path parameters
|
|
959
|
+
if id is not None:
|
|
960
|
+
_path_params['id'] = id
|
|
961
|
+
# process the query parameters
|
|
962
|
+
# process the header parameters
|
|
963
|
+
# process the form parameters
|
|
964
|
+
# process the body parameter
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
# set the HTTP header `Accept`
|
|
968
|
+
if 'Accept' not in _header_params:
|
|
969
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
970
|
+
[
|
|
971
|
+
'application/json'
|
|
972
|
+
]
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
# authentication setting
|
|
977
|
+
_auth_settings: List[str] = [
|
|
978
|
+
'bearerAuth'
|
|
979
|
+
]
|
|
980
|
+
|
|
981
|
+
return self.api_client.param_serialize(
|
|
982
|
+
method='POST',
|
|
983
|
+
resource_path='/api/v1/dlq/{id}/replay',
|
|
984
|
+
path_params=_path_params,
|
|
985
|
+
query_params=_query_params,
|
|
986
|
+
header_params=_header_params,
|
|
987
|
+
body=_body_params,
|
|
988
|
+
post_params=_form_params,
|
|
989
|
+
files=_files,
|
|
990
|
+
auth_settings=_auth_settings,
|
|
991
|
+
collection_formats=_collection_formats,
|
|
992
|
+
_host=_host,
|
|
993
|
+
_request_auth=_request_auth
|
|
994
|
+
)
|
|
995
|
+
|
|
996
|
+
|