mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-10-06 07:32:38 +02:00
Compare commits
3 Commits
deploy-028
...
deploy-029
Author | SHA1 | Date | |
---|---|---|---|
|
8aad253cf6 | ||
|
556d7af9dc | ||
|
b7a5219ed3 |
@@ -41,7 +41,7 @@ public class DomSampleClient {
|
|||||||
}
|
}
|
||||||
catch (StatusRuntimeException sre) {
|
catch (StatusRuntimeException sre) {
|
||||||
if (sre.getStatus() != Status.NOT_FOUND) {
|
if (sre.getStatus() != Status.NOT_FOUND) {
|
||||||
logger.error("Failed to fetch DOM sample");
|
logger.error("Failed to fetch DOM sample", sre);
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
|
@@ -98,10 +98,13 @@ public class DomainProcessor {
|
|||||||
return domSampleClient
|
return domSampleClient
|
||||||
.getSampleAsync(domainName, domSampleExecutor)
|
.getSampleAsync(domainName, domSampleExecutor)
|
||||||
.thenApply(domSampleClassifier::classifySample)
|
.thenApply(domSampleClassifier::classifySample)
|
||||||
.handle((a,b) ->
|
.handle((a,b) -> {
|
||||||
Objects.requireNonNullElseGet(a,
|
if (b != null) {
|
||||||
() -> EnumSet.of(DomSampleClassification.UNCLASSIFIED)))
|
logger.warn("Exception when fetching sample data", b);
|
||||||
.get();
|
return EnumSet.of(DomSampleClassification.UNCLASSIFIED);
|
||||||
|
}
|
||||||
|
return a;
|
||||||
|
}).get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Reference in New Issue
Block a user