File tree Expand file tree Collapse file tree
src/apify/storage_clients/_smart_apify Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,13 +118,13 @@ async def main():
118118
119119``` python
120120from crawlee import service_locator
121- from apify.storage_clients import ApifyStorageClient, ApifyHybridStorageClient , MemoryStorageClient
121+ from apify.storage_clients import ApifyStorageClient, SmartApifyStorageClient , MemoryStorageClient
122122from apify import Actor
123123
124124
125125async def main ():
126126 service_locator.set_storage_client(
127- ApifyHybridStorageClient (
127+ SmartApifyStorageClient (
128128 cloud_storage_client = ApifyStorageClient(request_queue_access = " single" ),
129129 local_storage_client = MemoryStorageClient()
130130 )
@@ -143,13 +143,17 @@ async def main():
143143
144144``` python
145145from crawlee import service_locator
146- from apify.storage_clients import ApifyStorageClient
146+ from apify.storage_clients import ApifyStorageClient, SmartApifyStorageClient
147147from apify import Actor
148148
149149
150150async def main ():
151151 # Full client that supports multiple consumers of the Apify Request Queue
152- service_locator.set_storage_client(ApifyStorageClient(request_queue_access = " shared" ))
152+ service_locator.set_storage_client(
153+ SmartApifyStorageClient(
154+ cloud_storage_client = ApifyStorageClient(request_queue_access = " shared" ),
155+ )
156+ )
153157 async with Actor:
154158 rq = await Actor.open_request_queue()
155159```
Original file line number Diff line number Diff line change 2121class SmartApifyStorageClient (StorageClient ):
2222 """SmartApifyStorageClient that delegates to cloud_storage_client or local_storage_client.
2323
24- When running on Apify platform use cloud_storage_client, else use local_storage_client. It has additional wrapper
25- methods with `force_cloud` parameter to force using cloud_storage_client when opening specific storages even when
26- not running on the Apify platform. This storage client is designed to work specifically in Actor context.
24+ When running on Apify platform use cloud_storage_client, else use local_storage_client. This storage client is
25+ designed to work specifically in Actor context.
2726 """
2827
2928 def __init__ (
You can’t perform that action at this time.
0 commit comments