@@ -121,21 +121,41 @@ def metamorph(
121
121
122
122
return _parse_date_fields (_pluck_data (response .json ()))
123
123
124
- def resurrect (self ) -> Dict :
124
+ def resurrect (
125
+ self ,
126
+ * ,
127
+ build : Optional [str ] = None ,
128
+ memory_mbytes : Optional [int ] = None ,
129
+ timeout_secs : Optional [int ] = None ,
130
+ ) -> Dict :
125
131
"""Resurrect a finished actor run.
126
132
127
133
Only finished runs, i.e. runs with status FINISHED, FAILED, ABORTED and TIMED-OUT can be resurrected.
128
134
Run status will be updated to RUNNING and its container will be restarted with the same default storages.
129
135
130
136
https://docs.apify.com/api/v2#/reference/actor-runs/resurrect-run/resurrect-run
131
137
138
+ Args:
139
+ build (str, optional): Which actor build the resurrected run should use. It can be either a build tag or build number.
140
+ By default, the resurrected run uses the same build as before.
141
+ memory_mbytes (int, optional): New memory limit for the resurrected run, in megabytes.
142
+ By default, the resurrected run uses the same memory limit as before.
143
+ timeout_secs (int, optional): New timeout for the resurrected run, in seconds.
144
+ By default, the resurrected run uses the same timeout as before.
145
+
132
146
Returns:
133
147
dict: The actor run data.
134
148
"""
149
+ request_params = self ._params (
150
+ build = build ,
151
+ memory = memory_mbytes ,
152
+ timeout = timeout_secs ,
153
+ )
154
+
135
155
response = self .http_client .call (
136
156
url = self ._url ('resurrect' ),
137
157
method = 'POST' ,
138
- params = self . _params () ,
158
+ params = request_params ,
139
159
)
140
160
141
161
return _parse_date_fields (_pluck_data (response .json ()))
@@ -295,21 +315,41 @@ async def metamorph(
295
315
296
316
return _parse_date_fields (_pluck_data (response .json ()))
297
317
298
- async def resurrect (self ) -> Dict :
318
+ async def resurrect (
319
+ self ,
320
+ * ,
321
+ build : Optional [str ] = None ,
322
+ memory_mbytes : Optional [int ] = None ,
323
+ timeout_secs : Optional [int ] = None ,
324
+ ) -> Dict :
299
325
"""Resurrect a finished actor run.
300
326
301
327
Only finished runs, i.e. runs with status FINISHED, FAILED, ABORTED and TIMED-OUT can be resurrected.
302
328
Run status will be updated to RUNNING and its container will be restarted with the same default storages.
303
329
304
330
https://docs.apify.com/api/v2#/reference/actor-runs/resurrect-run/resurrect-run
305
331
332
+ Args:
333
+ build (str, optional): Which actor build the resurrected run should use. It can be either a build tag or build number.
334
+ By default, the resurrected run uses the same build as before.
335
+ memory_mbytes (int, optional): New memory limit for the resurrected run, in megabytes.
336
+ By default, the resurrected run uses the same memory limit as before.
337
+ timeout_secs (int, optional): New timeout for the resurrected run, in seconds.
338
+ By default, the resurrected run uses the same timeout as before.
339
+
306
340
Returns:
307
341
dict: The actor run data.
308
342
"""
343
+ request_params = self ._params (
344
+ build = build ,
345
+ memory = memory_mbytes ,
346
+ timeout = timeout_secs ,
347
+ )
348
+
309
349
response = await self .http_client .call (
310
350
url = self ._url ('resurrect' ),
311
351
method = 'POST' ,
312
- params = self . _params () ,
352
+ params = request_params ,
313
353
)
314
354
315
355
return _parse_date_fields (_pluck_data (response .json ()))
0 commit comments