Skip to content

Commit bd7572f

Browse files
vdusekclaude
andauthored
fix: Use hashed request_id as cache key in shared RQ client reclaim_request (#795)
## Summary - In `ApifyRequestQueueSharedClient.reclaim_request`, the cache key was set to `request.unique_key` (raw URL string) instead of the hashed `request_id` (via `unique_key_to_request_id`) - Every other `_cache_request` call in the class uses the hashed `request_id`, creating an inconsistency that causes orphaned cache entries - After reclaiming, future cache lookups by `request_id` would miss the reclaimed request, potentially causing re-fetches or incorrect processing ## Test plan - [x] CI passes Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 252eb4e commit bd7572f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/apify/storage_clients/_apify/_request_queue_shared_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ async def reclaim_request(
267267
self.metadata.pending_request_count += 1
268268

269269
# Update the cache
270-
cache_key = request.unique_key
270+
request_id = unique_key_to_request_id(request.unique_key)
271271
self._cache_request(
272-
cache_key,
272+
request_id,
273273
processed_request,
274274
hydrated_request=request,
275275
)

0 commit comments

Comments
 (0)