mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(minor) Fix accidental commit errors
This commit is contained in:
parent
e9854f194c
commit
162fc25ebc
@ -20,6 +20,7 @@ public class AnchorTagsSourceFactory {
|
||||
private final int nodeId;
|
||||
private final HikariDataSource dataSource;
|
||||
private static final Logger logger = LoggerFactory.getLogger(AnchorTagsSourceFactory.class);
|
||||
|
||||
@Inject
|
||||
public AnchorTagsSourceFactory(HikariDataSource dataSource,
|
||||
ProcessConfiguration config)
|
||||
@ -30,7 +31,14 @@ public class AnchorTagsSourceFactory {
|
||||
}
|
||||
|
||||
public AnchorTagsSource create() throws SQLException {
|
||||
return create(getRelevantDomainsByNodeAffinity());
|
||||
try {
|
||||
return create(getRelevantDomainsByNodeAffinity());
|
||||
}
|
||||
catch (Exception e) {
|
||||
// likely a test environment
|
||||
logger.warn("Failed to create anchor tags source", e);
|
||||
return domain -> new DomainLinks();
|
||||
}
|
||||
}
|
||||
|
||||
public AnchorTagsSource create(List<EdgeDomain> relevantDomains) throws SQLException {
|
||||
|
@ -105,6 +105,8 @@ public class CrawlingThenConvertingIntegrationTest {
|
||||
|
||||
CrawledDomain crawlData = crawl(specs);
|
||||
|
||||
System.out.println(crawlData);
|
||||
|
||||
assertEquals("REDIRECT", crawlData.crawlerStatus);
|
||||
assertEquals("www.marginalia.nu", crawlData.redirectDomain);
|
||||
assertTrue(crawlData.doc.isEmpty());
|
||||
|
@ -127,7 +127,7 @@ public class HttpFetcherImpl implements HttpFetcher {
|
||||
EdgeUrl requestUrl = new EdgeUrl(rsp.request().url().toString());
|
||||
|
||||
if (!Objects.equals(requestUrl.domain, url.domain)) {
|
||||
return new ProbeResultRedirect(url.domain);
|
||||
return new ProbeResultRedirect(requestUrl.domain);
|
||||
}
|
||||
return new ProbeResultOk(requestUrl);
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ class CrawledDocumentParquetRecordFileWriterTest {
|
||||
Instant.now(),
|
||||
"text/html",
|
||||
"hello world".getBytes(),
|
||||
null,
|
||||
null, null);
|
||||
|
||||
// Write the record to a file
|
||||
|
@ -96,7 +96,7 @@ public class ScreenshotCaptureToolMain {
|
||||
private static byte[] fetchDomain(HttpClient client, EdgeDomain domain) {
|
||||
try {
|
||||
Map<String, Object> requestData = Map.of(
|
||||
"url", domain.toRootUrlHttp().toString(),
|
||||
"url", domain.toRootUrl().toString(),
|
||||
"options",
|
||||
Map.of("fullPage", false,
|
||||
"type", "png"),
|
||||
|
Loading…
Reference in New Issue
Block a user