From 8778e63fec981303b86c4ec9e7bdcf17aa0300aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Novotny=CC=81?= Date: Mon, 31 Jul 2023 13:16:03 +0200 Subject: [PATCH 1/2] feat: Add actor min/max memory to actor.json doc --- .../actors/development/actor_definition/actor_json.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/actor_json.md b/sources/platform/actors/development/actor_definition/actor_json.md index 229204a25e..2af7250814 100644 --- a/sources/platform/actors/development/actor_definition/actor_json.md +++ b/sources/platform/actors/development/actor_definition/actor_json.md @@ -25,6 +25,8 @@ import TabItem from '@theme/TabItem'; "name": "name-of-my-scraper", "version": "0.0", "buildTag": "latest", + "minMemoryMbytes": 256, + "maxMemoryMbytes": 4096, "environmentVariables": { "MYSQL_USER": "my_username", "MYSQL_PASSWORD": "@mySecretPassword" @@ -71,4 +73,5 @@ import TabItem from '@theme/TabItem'; | `readme` | Optional | If you specify the path to your README file under the `readme` field, the README at this path will be used on the platform. If not specified, README at `.actor/README.md` or `README.md` will be used, in this order of preference. See our [Apify Academy article on writing a quality README files](/academy/get-most-of-actors/actor-readme). | | `input` | Optional | You can embed your [input schema](./input_schema/index.md) object directly in `actor.json` under the `input` field. Alternatively, you can provide a path to a custom input schema. If not provided, the input schema at `.actor/INPUT_SCHEMA.json` or `INPUT_SCHEMA.json` is used, in this order of preference. | `storages.dataset` | Optional | You can define the schema of the items in your dataset under the `storages.dataset` field. This can be either an embedded object or a path to a JSON schema file. [Read more](./output_schema.md#specification-version-1) about Actor output schemas. | - +| `minMemoryMbytes` | Optional | Specifies the minimum amount of memory in megabytes that an Actor requires to run. Requires an integer value. If both `minMemoryMbytes` and `maxMemoryMbytes` are set, then `minMemoryMbytes` must be the same or lower than `maxMemoryMbytes`. | +| `maxMemoryMbytes` | Optional | Specifies the maximum amount of memory in megabytes that an Actor requires to run. It can be used to control the costs of run, especially when developing pay per result actors. Requires an integer value. | From e707de01801cffcbeecc82185b7e368227b1337d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Novotny=CC=81?= Date: Mon, 31 Jul 2023 13:16:35 +0200 Subject: [PATCH 2/2] Fix --- .../platform/actors/development/actor_definition/actor_json.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/actor_json.md b/sources/platform/actors/development/actor_definition/actor_json.md index 2af7250814..047b4ba4fe 100644 --- a/sources/platform/actors/development/actor_definition/actor_json.md +++ b/sources/platform/actors/development/actor_definition/actor_json.md @@ -26,7 +26,7 @@ import TabItem from '@theme/TabItem'; "version": "0.0", "buildTag": "latest", "minMemoryMbytes": 256, - "maxMemoryMbytes": 4096, + "maxMemoryMbytes": 4096, "environmentVariables": { "MYSQL_USER": "my_username", "MYSQL_PASSWORD": "@mySecretPassword"