-
Notifications
You must be signed in to change notification settings - Fork 507
fix: Fix BasicCrawler
statistics persistence
#1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
7dd0f66
f3b9812
3a28d42
ebc350d
52daca0
b2b4724
675dadf
37f6473
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,10 +41,10 @@ async def test_storage_not_persisted_when_disabled(tmp_path: Path, server_url: U | |
) | ||
storage_client = MemoryStorageClient() | ||
|
||
crawler = HttpCrawler( | ||
configuration=configuration, | ||
storage_client=storage_client, | ||
) | ||
service_locator.set_configuration(configuration) | ||
service_locator.set_storage_client(storage_client) | ||
|
||
crawler = HttpCrawler() | ||
Comment on lines
-44
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is because Mentioned here: I am open to discussion about this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't we use the storage client passed to the crawler? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could, but do we want to? I had an inconclusive discussion about this with @janbuchar There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, I'm kinda disappointed with the amount of edge cases that arose from having a separate service locator for crawlers. From a "common sense" perspective, the But, unless I'm missing something, it should be super rare that somebody will do this intentionally. In my opinion, we should pick one of these options and just show a warning if both the global and crawler-specific storage client are configured. |
||
|
||
@crawler.router.default_handler | ||
async def default_handler(context: HttpCrawlingContext) -> None: | ||
|
Uh oh!
There was an error while loading. Please reload this page.