From de47a3824f53fc8e6a40fd898d54d0544687f420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Thu, 2 Oct 2025 15:20:12 +0200 Subject: [PATCH 1/2] feat: move restart on error Actor option to Run options --- src/apify_client/clients/resource_clients/actor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apify_client/clients/resource_clients/actor.py b/src/apify_client/clients/resource_clients/actor.py index b889e431..e44f9800 100644 --- a/src/apify_client/clients/resource_clients/actor.py +++ b/src/apify_client/clients/resource_clients/actor.py @@ -69,7 +69,6 @@ def get_actor_representation( 'seoTitle': seo_title, 'seoDescription': seo_description, 'versions': versions, - 'restartOnError': restart_on_error, 'isPublic': is_public, 'isDeprecated': is_deprecated, 'isAnonymouslyRunnable': is_anonymously_runnable, @@ -79,6 +78,7 @@ def get_actor_representation( 'maxItems': default_run_max_items, 'memoryMbytes': default_run_memory_mbytes, 'timeoutSecs': default_run_timeout_secs, + 'restartOnError': restart_on_error, 'forcePermissionLevel': default_run_force_permission_level, }, 'exampleRunInput': { From 64a0a1ed52e559e00db816878a8054220945c4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Tue, 7 Oct 2025 13:14:41 +0200 Subject: [PATCH 2/2] feat: add restart_on_error option to resurrect run --- src/apify_client/clients/resource_clients/run.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/apify_client/clients/resource_clients/run.py b/src/apify_client/clients/resource_clients/run.py index 0392e815..22f4ac02 100644 --- a/src/apify_client/clients/resource_clients/run.py +++ b/src/apify_client/clients/resource_clients/run.py @@ -162,6 +162,7 @@ def resurrect( timeout_secs: int | None = None, max_items: int | None = None, max_total_charge_usd: Decimal | None = None, + restart_on_error: bool | None = None, ) -> dict: """Resurrect a finished Actor run. @@ -181,6 +182,8 @@ def resurrect( resurrected run uses the same limit as before. Limit can be only increased. max_total_charge_usd: Maximum cost for the resurrected pay-per-event run in USD. By default, the resurrected run uses the same limit as before. Limit can be only increased. + restart_on_error: Determines whether the resurrected run will be restarted if it fails. + By default, the resurrected run uses the same setting as before. Returns: The Actor run data. @@ -191,6 +194,7 @@ def resurrect( timeout=timeout_secs, maxItems=max_items, maxTotalChargeUsd=max_total_charge_usd, + restartOnError=restart_on_error, ) response = self.http_client.call( @@ -483,6 +487,7 @@ async def resurrect( timeout_secs: int | None = None, max_items: int | None = None, max_total_charge_usd: Decimal | None = None, + restart_on_error: bool | None = None, ) -> dict: """Resurrect a finished Actor run. @@ -502,6 +507,8 @@ async def resurrect( resurrected run uses the same limit as before. Limit can be only increased. max_total_charge_usd: Maximum cost for the resurrected pay-per-event run in USD. By default, the resurrected run uses the same limit as before. Limit can be only increased. + restart_on_error: Determines whether the resurrected run will be restarted if it fails. + By default, the resurrected run uses the same setting as before. Returns: The Actor run data. @@ -512,6 +519,7 @@ async def resurrect( timeout=timeout_secs, maxItems=max_items, maxTotalChargeUsd=max_total_charge_usd, + restartOnError=restart_on_error, ) response = await self.http_client.call(