@@ -121,21 +121,41 @@ def metamorph(
121121
122122 return _parse_date_fields (_pluck_data (response .json ()))
123123
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 :
125131 """Resurrect a finished actor run.
126132
127133 Only finished runs, i.e. runs with status FINISHED, FAILED, ABORTED and TIMED-OUT can be resurrected.
128134 Run status will be updated to RUNNING and its container will be restarted with the same default storages.
129135
130136 https://docs.apify.com/api/v2#/reference/actor-runs/resurrect-run/resurrect-run
131137
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+
132146 Returns:
133147 dict: The actor run data.
134148 """
149+ request_params = self ._params (
150+ build = build ,
151+ memory = memory_mbytes ,
152+ timeout = timeout_secs ,
153+ )
154+
135155 response = self .http_client .call (
136156 url = self ._url ('resurrect' ),
137157 method = 'POST' ,
138- params = self . _params () ,
158+ params = request_params ,
139159 )
140160
141161 return _parse_date_fields (_pluck_data (response .json ()))
@@ -295,21 +315,41 @@ async def metamorph(
295315
296316 return _parse_date_fields (_pluck_data (response .json ()))
297317
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 :
299325 """Resurrect a finished actor run.
300326
301327 Only finished runs, i.e. runs with status FINISHED, FAILED, ABORTED and TIMED-OUT can be resurrected.
302328 Run status will be updated to RUNNING and its container will be restarted with the same default storages.
303329
304330 https://docs.apify.com/api/v2#/reference/actor-runs/resurrect-run/resurrect-run
305331
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+
306340 Returns:
307341 dict: The actor run data.
308342 """
343+ request_params = self ._params (
344+ build = build ,
345+ memory = memory_mbytes ,
346+ timeout = timeout_secs ,
347+ )
348+
309349 response = await self .http_client .call (
310350 url = self ._url ('resurrect' ),
311351 method = 'POST' ,
312- params = self . _params () ,
352+ params = request_params ,
313353 )
314354
315355 return _parse_date_fields (_pluck_data (response .json ()))
0 commit comments