File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
src/apify/storage_clients/_apify Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -361,14 +361,7 @@ async def is_empty(self) -> bool:
361361 """
362362 head = await self ._list_head (limit = 1 , lock_time = None )
363363
364- # This if condition is necessary for proper functioning of the queue.
365- # Investigate why it is needed and if it can be removed.
366- if len (head .items ) == 0 :
367- logger .warning ('I am giving up, but I will sleep for a while before checking again.' )
368- await asyncio .sleep (10 )
369- head = await self ._list_head (limit = 1 , lock_time = None )
370-
371- return len (head .items ) == 0
364+ return len (head .items ) == 0 and not self ._queue_has_locked_requests
372365
373366 async def _ensure_head_is_non_empty (self ) -> None :
374367 """Ensure that the queue head has requests if they are available in the queue."""
You can’t perform that action at this time.
0 commit comments