@@ -77,41 +77,6 @@ async def _get_metadata_estimate(self) -> RequestQueueMetadata:
7777 # Get local estimation (will not include changes done bo another client)
7878 return self ._metadata
7979
80- @override
81- async def get_metadata (self ) -> RequestQueueMetadata :
82- """Get metadata about the request queue.
83-
84- Returns:
85- Metadata from the API, merged with local estimation, because in some cases, the data from the API can
86- be delayed.
87- """
88- response = await self ._api_client .get ()
89- if response is None :
90- raise ValueError ('Failed to fetch request queue metadata from the API.' )
91- # Enhance API response by local estimations (API can be delayed few seconds, while local estimation not.)
92- return RequestQueueMetadata (
93- id = response ['id' ],
94- name = response ['name' ],
95- total_request_count = max (response ['totalRequestCount' ], self ._metadata .total_request_count ),
96- handled_request_count = max (response ['handledRequestCount' ], self ._metadata .handled_request_count ),
97- pending_request_count = response ['pendingRequestCount' ],
98- created_at = min (response ['createdAt' ], self ._metadata .created_at ),
99- modified_at = max (response ['modifiedAt' ], self ._metadata .modified_at ),
100- accessed_at = max (response ['accessedAt' ], self ._metadata .accessed_at ),
101- had_multiple_clients = response ['hadMultipleClients' ] or self ._metadata .had_multiple_clients ,
102- )
103-
104- @override
105- async def purge (self ) -> None :
106- raise NotImplementedError (
107- 'Purging the request queue is not supported in the Apify platform. '
108- 'Use the `drop` method to delete the request queue instead.'
109- )
110-
111- @override
112- async def drop (self ) -> None :
113- await self ._api_client .delete ()
114-
11580 @override
11681 async def add_batch_of_requests (
11782 self ,
0 commit comments