Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/crawlee/storages/_request_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def __init__(self, id: str, name: str | None, storage_client: BaseStorageClient)
self._queue_paused_for_migration = False

event_manager.on(event=Event.MIGRATING, listener=lambda _: setattr(self, '_queue_paused_for_migration', True))
event_manager.on(event=Event.MIGRATING, listener=lambda _: self._clear_possible_locks())
event_manager.on(event=Event.ABORTING, listener=lambda _: self._clear_possible_locks())
event_manager.on(event=Event.MIGRATING, listener=self._clear_possible_locks)
event_manager.on(event=Event.ABORTING, listener=self._clear_possible_locks)

# Other internal attributes
self._tasks = list[asyncio.Task]()
Expand Down Expand Up @@ -494,7 +494,7 @@ async def is_finished(self) -> bool:
'Queue head still returned requests that need to be processed (or that are locked by other clients)',
)

return not current_head.items and not self._in_progress
return (not current_head.items and not self._in_progress) or self._queue_paused_for_migration

async def get_info(self) -> RequestQueueMetadata | None:
"""Get an object containing general information about the request queue."""
Expand Down