diff --git a/apify-api/openapi/components/schemas/actor-tasks/TaskOptions.yaml b/apify-api/openapi/components/schemas/actor-tasks/TaskOptions.yaml index c1b9c71641..323b1f5bb3 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/TaskOptions.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/TaskOptions.yaml @@ -13,3 +13,7 @@ properties: type: number nullable: true example: 128 + restartOnError: + type: boolean + nullable: true + example: false diff --git a/apify-api/openapi/components/schemas/actors/Actor.yaml b/apify-api/openapi/components/schemas/actors/Actor.yaml index 7b6614b51e..34cb6c6002 100644 --- a/apify-api/openapi/components/schemas/actors/Actor.yaml +++ b/apify-api/openapi/components/schemas/actors/Actor.yaml @@ -31,8 +31,8 @@ properties: example: My favourite actor! restartOnError: type: boolean - nullable: true example: false + deprecated: true # Use defaultRunOptions.restartOnError instead isPublic: type: boolean example: false diff --git a/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml b/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml index 4b6d5058a9..8631096eec 100644 --- a/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml +++ b/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml @@ -27,8 +27,8 @@ properties: example: My actor is the best restartOnError: type: boolean - nullable: true example: false + deprecated: true # Use defaultRunOptions.restartOnError instead versions: type: array items: @@ -46,6 +46,4 @@ properties: description: '' nullable: true defaultRunOptions: - oneOf: - - nullable: true - - $ref: ./DefaultRunOptions.yaml + $ref: ./DefaultRunOptions.yaml diff --git a/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml b/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml index 64f6a6a3b2..7c8efa84dc 100644 --- a/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml +++ b/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml @@ -14,3 +14,6 @@ properties: memoryMbytes: type: number example: 2048 + restartOnError: + type: boolean + example: false diff --git a/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml b/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml index ce242295c6..6be07cd905 100644 --- a/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml +++ b/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml @@ -1,8 +1,4 @@ title: ActUpdate -required: - - name - - isPublic - - versions type: object properties: name: @@ -29,8 +25,8 @@ properties: example: My Actor restartOnError: type: boolean - nullable: true example: false + deprecated: true # Use defaultRunOptions.restartOnError instead versions: type: array items: @@ -47,9 +43,7 @@ properties: description: '' nullable: true defaultRunOptions: - oneOf: - - nullable: true - - $ref: ./DefaultRunOptions.yaml + $ref: ./DefaultRunOptions.yaml taggedBuilds: type: object description: | @@ -104,3 +98,8 @@ properties: latest: buildId: z2EryhbfhgSyqj6Hn beta: null +required: + - name + - isPublic + - versions + diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleActionsRunOptions.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleActionsRunOptions.yaml index 5d86e5de45..b63f294a1b 100644 --- a/apify-api/openapi/components/schemas/schedules/ScheduleActionsRunOptions.yaml +++ b/apify-api/openapi/components/schemas/schedules/ScheduleActionsRunOptions.yaml @@ -13,3 +13,7 @@ properties: type: number nullable: true example: 1024 + restartOnError: + type: boolean + nullable: true + example: false diff --git a/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml b/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml index 4cba3f46d6..1df4b2feb8 100644 --- a/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml +++ b/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml @@ -54,6 +54,14 @@ post: example: 10 description: | Optional maximum cost of the run, in USD. Used for pay-per-event Actors. The value can only be increased beyond the value specified when the Actor run was started. + - name: restartOnError + in: query + required: false + schema: + type: boolean + example: false + description: | + Determines whether the resurrected run will be restarted if it fails. By default, the resurrected run uses the same setting as before. responses: '200': description: '' diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml index 3c43531982..eee73ffa96 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml @@ -476,6 +476,15 @@ post: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml index 488cdcb98e..9782b7b5c6 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml @@ -223,6 +223,15 @@ post: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml index c9c9da4293..5c7c80418d 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml @@ -215,6 +215,15 @@ post: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | diff --git a/apify-api/openapi/paths/actors/acts.yaml b/apify-api/openapi/paths/actors/acts.yaml index b07febbf7d..45e416677f 100644 --- a/apify-api/openapi/paths/actors/acts.yaml +++ b/apify-api/openapi/paths/actors/acts.yaml @@ -142,7 +142,6 @@ post: isPublic: false seoTitle: My Actor seoDescription: My Actor is the best - restartOnError: false versions: - versionNumber: '0.0' sourceType: SOURCE_FILES @@ -161,6 +160,7 @@ post: build: latest timeoutSecs: 3600 memoryMbytes: 2048 + restartOnError: false required: true responses: '201': @@ -183,7 +183,6 @@ post: name: MyActor username: jane35 description: My favourite Actor! - restartOnError: false isPublic: false createdAt: '2019-07-08T11:27:57.401Z' modifiedAt: '2019-07-08T14:01:05.546Z' @@ -225,6 +224,7 @@ post: build: latest timeoutSecs: 3600 memoryMbytes: 2048 + restartOnError: false exampleRunInput: body: '{ "helloWorld": 123 }' contentType: application/json; charset=utf-8 diff --git a/apify-api/openapi/paths/actors/acts@{actorId}.yaml b/apify-api/openapi/paths/actors/acts@{actorId}.yaml index f86cfb3428..89f32a89a8 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}.yaml @@ -28,7 +28,6 @@ get: name: MyActor username: jane35 description: My favourite Actor! - restartOnError: false isPublic: false createdAt: '2019-07-08T11:27:57.401Z' modifiedAt: '2019-07-08T14:01:05.546Z' @@ -70,6 +69,7 @@ get: build: latest timeoutSecs: 3600 memoryMbytes: 2048 + restartOnError: false exampleRunInput: body: '{ "helloWorld": 123 }' contentType: application/json; charset=utf-8 @@ -143,7 +143,6 @@ put: seoTitle: My Actor seoDescription: My Actor is the best title: My Actor - restartOnError: false versions: - versionNumber: '0.0' sourceType: SOURCE_FILES @@ -162,6 +161,7 @@ put: build: latest timeoutSecs: 3600 memoryMbytes: 2048 + restartOnError: false taggedBuildsCreateOrReassignTag: summary: 'Create or reassign a build tag' value: @@ -196,7 +196,6 @@ put: name: MyActor username: jane35 description: My favourite Actor! - restartOnError: false isPublic: false createdAt: '2019-07-08T11:27:57.401Z' modifiedAt: '2019-07-08T14:01:05.546Z' @@ -238,6 +237,7 @@ put: build: latest timeoutSecs: 3600 memoryMbytes: 2048 + restartOnError: false exampleRunInput: body: '{ "helloWorld": 123 }' contentType: application/json; charset=utf-8 diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml index 949392d0c4..3e9bbfdcae 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml @@ -88,6 +88,15 @@ post: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | @@ -490,6 +499,15 @@ get: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml index 84fe42c1d9..209320c11d 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -94,6 +94,15 @@ post: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | @@ -255,6 +264,15 @@ get: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml index 2dd68c4d86..3e39d6a6c0 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml @@ -230,6 +230,15 @@ post: type: number format: double example: 5 + - name: restartOnError + in: query + description: | + Determines whether the run will be restarted if it fails. + style: form + explode: true + schema: + type: boolean + example: false - name: build in: query description: | diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml index 46617a6a5b..968cc59e04 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml @@ -68,6 +68,15 @@ post: type: number format: double example: 256 + - name: restartOnError + in: query + description: | + Determines whether the resurrected run will be restarted if it fails. By default, the resurrected run uses the same setting as before. + style: form + explode: true + schema: + type: boolean + example: false responses: '200': description: '' diff --git a/sources/platform/actors/development/programming_interface/environment_variables.md b/sources/platform/actors/development/programming_interface/environment_variables.md index 3daf654ccf..7830d19ebf 100644 --- a/sources/platform/actors/development/programming_interface/environment_variables.md +++ b/sources/platform/actors/development/programming_interface/environment_variables.md @@ -50,6 +50,7 @@ Here's a table of key system environment variables: | `ACTOR_INPUT_KEY` | Key of the record in the default key-value store that holds the [Actor input](/platform/actors/running/input-and-output#input). | | `ACTOR_MAX_PAID_DATASET_ITEMS` | For paid-per-result Actors, the user-set limit on returned results. Do not exceed this limit. | | `ACTOR_MAX_TOTAL_CHARGE_USD` | For pay-per-event Actors, the user-set limit on run cost. Do not exceed this limit. | +| `ACTOR_RESTART_ON_ERROR` | If **1**, the Actor run will be restarted if it fails. | | `APIFY_HEADLESS` | If **1**, web browsers inside the Actor should run in headless mode (no windowing system available). | | `APIFY_IS_AT_HOME` | Contains **1** if the Actor is running on Apify servers. | | `ACTOR_MEMORY_MBYTES` | Size of memory allocated for the Actor run, in megabytes. Can be used to optimize memory usage or finetuning of low-level external libraries. |