@@ -32,6 +32,7 @@ def get_task_representation(
3232 max_items : int | None = None ,
3333 memory_mbytes : int | None = None ,
3434 timeout_secs : int | None = None ,
35+ restart_on_error : bool | None = None ,
3536 title : str | None = None ,
3637 actor_standby_desired_requests_per_actor_run : int | None = None ,
3738 actor_standby_max_requests_per_actor_run : int | None = None ,
@@ -48,6 +49,7 @@ def get_task_representation(
4849 'maxItems' : max_items ,
4950 'memoryMbytes' : memory_mbytes ,
5051 'timeoutSecs' : timeout_secs ,
52+ 'restartOnError' : restart_on_error ,
5153 },
5254 'input' : task_input ,
5355 'title' : title ,
@@ -87,6 +89,7 @@ def update(
8789 max_items : int | None = None ,
8890 memory_mbytes : int | None = None ,
8991 timeout_secs : int | None = None ,
92+ restart_on_error : bool | None = None ,
9093 title : str | None = None ,
9194 actor_standby_desired_requests_per_actor_run : int | None = None ,
9295 actor_standby_max_requests_per_actor_run : int | None = None ,
@@ -109,6 +112,8 @@ def update(
109112 timeout_secs: Optional timeout for the run, in seconds. By default, the run uses timeout specified
110113 in the task settings.
111114 task_input: Task input dictionary.
115+ restart_on_error: If true, the Task run process will be restarted whenever it exits with
116+ a non-zero status code.
112117 title: A human-friendly equivalent of the name.
113118 actor_standby_desired_requests_per_actor_run: The desired number of concurrent HTTP requests for
114119 a single Actor Standby run.
@@ -129,6 +134,7 @@ def update(
129134 max_items = max_items ,
130135 memory_mbytes = memory_mbytes ,
131136 timeout_secs = timeout_secs ,
137+ restart_on_error = restart_on_error ,
132138 title = title ,
133139 actor_standby_desired_requests_per_actor_run = actor_standby_desired_requests_per_actor_run ,
134140 actor_standby_max_requests_per_actor_run = actor_standby_max_requests_per_actor_run ,
@@ -154,6 +160,7 @@ def start(
154160 max_items : int | None = None ,
155161 memory_mbytes : int | None = None ,
156162 timeout_secs : int | None = None ,
163+ restart_on_error : bool | None = None ,
157164 wait_for_finish : int | None = None ,
158165 webhooks : list [dict ] | None = None ,
159166 ) -> dict :
@@ -171,6 +178,8 @@ def start(
171178 in the task settings.
172179 timeout_secs: Optional timeout for the run, in seconds. By default, the run uses timeout specified
173180 in the task settings.
181+ restart_on_error: If true, the Task run process will be restarted whenever it exits with
182+ a non-zero status code.
174183 wait_for_finish: The maximum number of seconds the server waits for the run to finish. By default,
175184 it is 0, the maximum value is 60.
176185 webhooks: Optional ad-hoc webhooks (https://docs.apify.com/webhooks/ad-hoc-webhooks) associated with
@@ -189,6 +198,7 @@ def start(
189198 maxItems = max_items ,
190199 memory = memory_mbytes ,
191200 timeout = timeout_secs ,
201+ restartOnError = restart_on_error ,
192202 waitForFinish = wait_for_finish ,
193203 webhooks = encode_webhook_list_to_base64 (webhooks ) if webhooks is not None else None ,
194204 )
@@ -211,6 +221,7 @@ def call(
211221 max_items : int | None = None ,
212222 memory_mbytes : int | None = None ,
213223 timeout_secs : int | None = None ,
224+ restart_on_error : bool | None = None ,
214225 webhooks : list [dict ] | None = None ,
215226 wait_secs : int | None = None ,
216227 ) -> dict | None :
@@ -230,6 +241,8 @@ def call(
230241 in the task settings.
231242 timeout_secs: Optional timeout for the run, in seconds. By default, the run uses timeout specified
232243 in the task settings.
244+ restart_on_error: If true, the Task run process will be restarted whenever it exits with
245+ a non-zero status code.
233246 webhooks: Specifies optional webhooks associated with the Actor run, which can be used to receive
234247 a notification e.g. when the Actor finished or failed. Note: if you already have a webhook set up for
235248 the Actor or task, you do not have to add it again here.
@@ -245,6 +258,7 @@ def call(
245258 max_items = max_items ,
246259 memory_mbytes = memory_mbytes ,
247260 timeout_secs = timeout_secs ,
261+ restart_on_error = restart_on_error ,
248262 webhooks = webhooks ,
249263 )
250264
@@ -343,6 +357,7 @@ async def update(
343357 max_items : int | None = None ,
344358 memory_mbytes : int | None = None ,
345359 timeout_secs : int | None = None ,
360+ restart_on_error : bool | None = None ,
346361 title : str | None = None ,
347362 actor_standby_desired_requests_per_actor_run : int | None = None ,
348363 actor_standby_max_requests_per_actor_run : int | None = None ,
@@ -364,6 +379,8 @@ async def update(
364379 in the task settings.
365380 timeout_secs: Optional timeout for the run, in seconds. By default, the run uses timeout specified
366381 in the task settings.
382+ restart_on_error: If true, the Task run process will be restarted whenever it exits with
383+ a non-zero status code.
367384 task_input: Task input dictionary.
368385 title: A human-friendly equivalent of the name.
369386 actor_standby_desired_requests_per_actor_run: The desired number of concurrent HTTP requests for
@@ -385,6 +402,7 @@ async def update(
385402 max_items = max_items ,
386403 memory_mbytes = memory_mbytes ,
387404 timeout_secs = timeout_secs ,
405+ restart_on_error = restart_on_error ,
388406 title = title ,
389407 actor_standby_desired_requests_per_actor_run = actor_standby_desired_requests_per_actor_run ,
390408 actor_standby_max_requests_per_actor_run = actor_standby_max_requests_per_actor_run ,
@@ -410,6 +428,7 @@ async def start(
410428 max_items : int | None = None ,
411429 memory_mbytes : int | None = None ,
412430 timeout_secs : int | None = None ,
431+ restart_on_error : bool | None = None ,
413432 wait_for_finish : int | None = None ,
414433 webhooks : list [dict ] | None = None ,
415434 ) -> dict :
@@ -427,6 +446,8 @@ async def start(
427446 in the task settings.
428447 timeout_secs: Optional timeout for the run, in seconds. By default, the run uses timeout specified
429448 in the task settings.
449+ restart_on_error: If true, the Task run process will be restarted whenever it exits with
450+ a non-zero status code.
430451 wait_for_finish: The maximum number of seconds the server waits for the run to finish. By default,
431452 it is 0, the maximum value is 60.
432453 webhooks: Optional ad-hoc webhooks (https://docs.apify.com/webhooks/ad-hoc-webhooks) associated with
@@ -445,6 +466,7 @@ async def start(
445466 maxItems = max_items ,
446467 memory = memory_mbytes ,
447468 timeout = timeout_secs ,
469+ restartOnError = restart_on_error ,
448470 waitForFinish = wait_for_finish ,
449471 webhooks = encode_webhook_list_to_base64 (webhooks ) if webhooks is not None else None ,
450472 )
@@ -467,6 +489,7 @@ async def call(
467489 max_items : int | None = None ,
468490 memory_mbytes : int | None = None ,
469491 timeout_secs : int | None = None ,
492+ restart_on_error : bool | None = None ,
470493 webhooks : list [dict ] | None = None ,
471494 wait_secs : int | None = None ,
472495 ) -> dict | None :
@@ -486,6 +509,8 @@ async def call(
486509 in the task settings.
487510 timeout_secs: Optional timeout for the run, in seconds. By default, the run uses timeout specified
488511 in the task settings.
512+ restart_on_error: If true, the Task run process will be restarted whenever it exits with
513+ a non-zero status code.
489514 webhooks: Specifies optional webhooks associated with the Actor run, which can be used to receive
490515 a notification e.g. when the Actor finished or failed. Note: if you already have a webhook set up for
491516 the Actor or task, you do not have to add it again here.
@@ -501,6 +526,7 @@ async def call(
501526 max_items = max_items ,
502527 memory_mbytes = memory_mbytes ,
503528 timeout_secs = timeout_secs ,
529+ restart_on_error = restart_on_error ,
504530 webhooks = webhooks ,
505531 )
506532
0 commit comments