Skip to content

Commit 53d44ad

Browse files
committed
address feedback
1 parent 7552da6 commit 53d44ad

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/apify/storage_clients/_apify/_request_queue_single_client.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,10 @@ async def add_batch_of_requests(
108108
# Check if request is known to be already handled (it has to be present as well.)
109109
if request.unique_key in self._requests_already_handled:
110110
already_present_requests.append(
111-
ProcessedRequest.model_validate(
112-
ProcessedRequest(
113-
unique_key=request.unique_key,
114-
was_already_present=True,
115-
was_already_handled=True,
116-
)
111+
ProcessedRequest(
112+
unique_key=request.unique_key,
113+
was_already_present=True,
114+
was_already_handled=True,
117115
)
118116
)
119117
# Check if request is known to be already present, but unhandled
@@ -260,8 +258,6 @@ async def _list_head(self) -> None:
260258
f'Request ID mismatch: {request_id} != {request_data["id"]}, '
261259
'this may cause unexpected behavior.'
262260
)
263-
full_request_data = await self._api_client.get_request(request_id)
264-
request = Request.model_validate(full_request_data)
265261
self._requests_cache[request.unique_key] = request
266262

267263
# Add new requests to the end of the head, unless already present in head

0 commit comments

Comments
 (0)