From 59dcf0cc858308e9801f87631dc5135f917cae6d Mon Sep 17 00:00:00 2001 From: Josef Prochazka Date: Tue, 25 Feb 2025 09:31:49 +0100 Subject: [PATCH 1/3] Add force_cloud documentation. --- docs/03_concepts/03_storages.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/03_concepts/03_storages.mdx b/docs/03_concepts/03_storages.mdx index b7d18576..896acb9b 100644 --- a/docs/03_concepts/03_storages.mdx +++ b/docs/03_concepts/03_storages.mdx @@ -38,6 +38,10 @@ Each storage is then stored in its own folder, named after the storage, or calle Each dataset item, key-value store record, or request in a request queue is then stored in its own file in the storage folder. Dataset items and request queue requests are always JSON files, and key-value store records can be any file type, based on its content type. For example, the Actor input is typically stored in `storage/key_value_stores/default/INPUT.json`. +## Local Actor run with non-local storage + +When developing locally, opening any storage will by default use local storage. To change this behavior and to use non-local storage you have to use `force_cloud=True` argument in [`Actor.open_dataset`](../../reference/class/Actor#open_dataset), [`Actor.open_request_queue`](../../reference/class/Actor#open_request_queue) or [`Actor.open_key_value_store`](../../reference/class/Actor#open_key_value_store). Proper use of this argument allows you to work with both local and non-local storages. + ### Local storage persistence By default, the storage contents are persisted across multiple Actor runs. To clean up the Actor storages before the running the Actor, use the `--purge` flag of the [`apify run`](https://docs.apify.com/cli/docs/reference#apify-run) command of the Apify CLI. From 8d222419e51028b9fb0eab93023ce76f65c7c625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Proch=C3=A1zka?= Date: Tue, 25 Feb 2025 12:47:11 +0100 Subject: [PATCH 2/3] Update docs/03_concepts/03_storages.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Martin Adámek --- docs/03_concepts/03_storages.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/03_concepts/03_storages.mdx b/docs/03_concepts/03_storages.mdx index 896acb9b..88c9d295 100644 --- a/docs/03_concepts/03_storages.mdx +++ b/docs/03_concepts/03_storages.mdx @@ -40,7 +40,7 @@ Each dataset item, key-value store record, or request in a request queue is then ## Local Actor run with non-local storage -When developing locally, opening any storage will by default use local storage. To change this behavior and to use non-local storage you have to use `force_cloud=True` argument in [`Actor.open_dataset`](../../reference/class/Actor#open_dataset), [`Actor.open_request_queue`](../../reference/class/Actor#open_request_queue) or [`Actor.open_key_value_store`](../../reference/class/Actor#open_key_value_store). Proper use of this argument allows you to work with both local and non-local storages. +When developing locally, opening any storage will by default use local storage. To change this behavior and to use non-local storage you have to use `force_cloud=True` argument in [`Actor.open_dataset`](../../reference/class/Actor#open_dataset), [`Actor.open_request_queue`](../../reference/class/Actor#open_request_queue) or [`Actor.open_key_value_store`](../../reference/class/Actor#open_key_value_store). Proper use of this argument allows you to work with both local and remote storages. ### Local storage persistence From 0c94a581c6f4dea72e30ad2c99525eae5e0465ad Mon Sep 17 00:00:00 2001 From: Josef Prochazka Date: Tue, 25 Feb 2025 12:58:23 +0100 Subject: [PATCH 3/3] Add example use case to docs --- docs/03_concepts/03_storages.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/03_concepts/03_storages.mdx b/docs/03_concepts/03_storages.mdx index 88c9d295..a56a54c1 100644 --- a/docs/03_concepts/03_storages.mdx +++ b/docs/03_concepts/03_storages.mdx @@ -38,9 +38,11 @@ Each storage is then stored in its own folder, named after the storage, or calle Each dataset item, key-value store record, or request in a request queue is then stored in its own file in the storage folder. Dataset items and request queue requests are always JSON files, and key-value store records can be any file type, based on its content type. For example, the Actor input is typically stored in `storage/key_value_stores/default/INPUT.json`. -## Local Actor run with non-local storage +## Local Actor run with remote storage -When developing locally, opening any storage will by default use local storage. To change this behavior and to use non-local storage you have to use `force_cloud=True` argument in [`Actor.open_dataset`](../../reference/class/Actor#open_dataset), [`Actor.open_request_queue`](../../reference/class/Actor#open_request_queue) or [`Actor.open_key_value_store`](../../reference/class/Actor#open_key_value_store). Proper use of this argument allows you to work with both local and remote storages. +When developing locally, opening any storage will by default use local storage. To change this behavior and to use remote storage you have to use `force_cloud=True` argument in [`Actor.open_dataset`](../../reference/class/Actor#open_dataset), [`Actor.open_request_queue`](../../reference/class/Actor#open_request_queue) or [`Actor.open_key_value_store`](../../reference/class/Actor#open_key_value_store). Proper use of this argument allows you to work with both local and remote storages. + +Calling another remote Actor and accessing its default storage is typical use-case for using `force-cloud=True` argument to open remote Actor's storages. ### Local storage persistence