Skip to content

Commit a4d557d

Browse files
committed
Review comments
1 parent 29ae9cc commit a4d557d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/crawlee/crawlers/_basic/_basic_crawler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ def __init__(
355355
status_message_logging_interval: Interval for logging the crawler status messages.
356356
status_message_callback: Allows overriding the default status message. The default status message is
357357
provided in the parameters. Returning `None` suppresses the status message.
358-
id: Id of the crawler used for state tracking. You can use same explicit id to share state and between two
359-
crawlers. By default, each crawler will use own state.
358+
id: Identifier used for crawler state tracking. Use the same id across multiple crawlers to share state
359+
between them.
360360
_context_pipeline: Enables extending the request lifecycle and modifying the crawling context.
361361
Intended for use by subclasses rather than direct instantiation of `BasicCrawler`.
362362
_additional_context_managers: Additional context managers used throughout the crawler lifecycle.

tests/unit/crawlers/_basic/test_basic_crawler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1722,7 +1722,7 @@ async def test_add_requests_with_rq_param(queue_name: str | None, queue_alias: s
17221722
crawler = BasicCrawler()
17231723
rq = await RequestQueue.open(name=queue_name, alias=queue_alias)
17241724
if by_id:
1725-
queue_id = rq._id
1725+
queue_id = rq.id
17261726
queue_name = None
17271727
else:
17281728
queue_id = None
@@ -1816,6 +1816,7 @@ async def request_handler(context: BasicCrawlingContext) -> None:
18161816
context.log.info(f'State {state}')
18171817

18181818
crawler = BasicCrawler(
1819+
id=crawler_id,
18191820
request_handler=request_handler,
18201821
concurrency_settings=ConcurrencySettings(max_concurrency=1, desired_concurrency=1),
18211822
configuration=Configuration(

0 commit comments

Comments
 (0)