You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/04_upgrading/upgrading_to_v3.md
+27-4Lines changed: 27 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,28 @@ async def main():
53
53
54
54
<!-- TODO -->
55
55
56
+
## Explicit control over storage clients used in Actor
57
+
- It is now possible to have full control over which storage clients are used by the `Actor`. To make development of Actors convenient, the `Actor` has two storage clients. One that is used when running on Apify platform or when opening storages with `force_cloud=True` and the other client that is used when running outside the Apify platform. The `Actor` has reasonable defaults and for the majority of use-cases there is no need to change it. However, if you need to use a different storage client, you can set it up before entering `Actor` context through `service_locator`.
58
+
59
+
**Now (v3.0):**
60
+
```python
61
+
from crawlee import service_locator
62
+
from apify.storage_clients import ApifyStorageClient, ApifyHybridStorageClient, MemoryStorageClient
## The default use of optimized ApifyRequestQueueClient
57
79
58
80
- The default client for working with Apify platform based `RequestQueue` is now optimized and simplified client which does significantly lower amount of API calls, but does not support multiple consumers working on the same queue. It is cheaper and faster and is suitable for the majority of the use cases.
@@ -61,12 +83,13 @@ async def main():
61
83
**Now (v3.0):**
62
84
63
85
```python
64
-
fromapify.storagesimportRequestQueue
86
+
fromcrawleeimportservice_locator
65
87
from apify.storage_clients import ApifyStorageClient
88
+
from apify import Actor
66
89
67
90
asyncdefmain():
68
91
# Full client that supports multiple consumers of the Apify Request Queue
0 commit comments