MCPcopy Create free account
hub / github.com/apify/crawlee-python / open

Method open

src/crawlee/storages/_request_queue.py:120–142  ·  view source on GitHub ↗
(
        cls,
        *,
        id: str | None = None,
        name: str | None = None,
        alias: str | None = None,
        configuration: Configuration | None = None,
        storage_client: StorageClient | None = None,
    )

Source from the content-addressed store, hash-verified

118 @override
119 @classmethod
120 async def open(
121 cls,
122 *,
123 id: str | None = None,
124 name: str | None = None,
125 alias: str | None = None,
126 configuration: Configuration | None = None,
127 storage_client: StorageClient | None = None,
128 ) -> RequestQueue:
129 configuration = service_locator.get_configuration() if configuration is None else configuration
130 storage_client = service_locator.get_storage_client() if storage_client is None else storage_client
131
132 client_opener_coro = storage_client.create_rq_client(id=id, name=name, alias=alias, configuration=configuration)
133 additional_cache_key = storage_client.get_storage_client_cache_key(configuration=configuration)
134
135 return await service_locator.storage_instance_manager.open_storage_instance(
136 cls,
137 id=id,
138 name=name,
139 alias=alias,
140 client_opener_coro=client_opener_coro,
141 storage_client_cache_key=additional_cache_key,
142 )
143
144 @override
145 async def drop(self) -> None:

Callers 1

purgeMethod · 0.45

Calls 5

get_configurationMethod · 0.80
get_storage_clientMethod · 0.80
open_storage_instanceMethod · 0.80
create_rq_clientMethod · 0.45

Tested by

no test coverage detected