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 | |
---|---|---|---|
|
23c818281b | ||
|
8aad253cf6 | ||
|
556d7af9dc |
@@ -1,9 +1,9 @@
|
||||
package nu.marginalia.service.server;
|
||||
|
||||
import io.grpc.Server;
|
||||
import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder;
|
||||
import io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.grpc.netty.shaded.io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import io.grpc.netty.NettyServerBuilder;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import nu.marginalia.service.discovery.ServiceRegistryIf;
|
||||
import nu.marginalia.service.discovery.property.ServiceKey;
|
||||
import nu.marginalia.service.discovery.property.ServicePartition;
|
||||
|
@@ -41,7 +41,7 @@ public class DomSampleClient {
|
||||
}
|
||||
catch (StatusRuntimeException sre) {
|
||||
if (sre.getStatus() != Status.NOT_FOUND) {
|
||||
logger.error("Failed to fetch DOM sample");
|
||||
logger.error("Failed to fetch DOM sample", sre);
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
@@ -90,6 +90,7 @@ dependencies {
|
||||
implementation libs.commons.lang3
|
||||
implementation libs.commons.compress
|
||||
implementation libs.sqlite
|
||||
implementation libs.bundles.grpc
|
||||
|
||||
implementation libs.bundles.httpcomponents
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package nu.marginalia.converting.processor;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import io.grpc.Status;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
import nu.marginalia.api.domsample.DomSampleClient;
|
||||
import nu.marginalia.atags.model.DomainLinks;
|
||||
import nu.marginalia.atags.source.AnchorTagsSource;
|
||||
@@ -98,10 +100,15 @@ public class DomainProcessor {
|
||||
return domSampleClient
|
||||
.getSampleAsync(domainName, domSampleExecutor)
|
||||
.thenApply(domSampleClassifier::classifySample)
|
||||
.handle((a,b) ->
|
||||
Objects.requireNonNullElseGet(a,
|
||||
() -> EnumSet.of(DomSampleClassification.UNCLASSIFIED)))
|
||||
.get();
|
||||
.handle((a,b) -> {
|
||||
if (b != null) {
|
||||
if (!(b instanceof StatusRuntimeException sre && sre.getStatus() != Status.NOT_FOUND)) {
|
||||
logger.warn("Exception when fetching sample data", b);
|
||||
}
|
||||
return EnumSet.of(DomSampleClassification.UNCLASSIFIED);
|
||||
}
|
||||
return a;
|
||||
}).get();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -160,7 +160,7 @@ dependencyResolutionManagement {
|
||||
library('protobuf', 'com.google.protobuf', 'protobuf-java').version('3.16.3')
|
||||
library('grpc-protobuf', 'io.grpc', 'grpc-protobuf').version('1.73.0')
|
||||
library('grpc-stub', 'io.grpc', 'grpc-stub').version('1.73.0')
|
||||
library('grpc-netty', 'io.grpc', 'grpc-netty-shaded').version('1.73.0')
|
||||
library('grpc-netty', 'io.grpc', 'grpc-netty').version('1.73.0')
|
||||
|
||||
library('prometheus', 'io.prometheus', 'simpleclient').version('0.16.0')
|
||||
library('prometheus-servlet', 'io.prometheus', 'simpleclient_servlet').version('0.16.0')
|
||||
|
Reference in New Issue
Block a user