fixed ping event update for closed

This commit is contained in:
anhefti 2019-12-11 16:56:16 +01:00
parent d4c385a635
commit 9f72f68738
3 changed files with 5 additions and 4 deletions

View file

@ -404,6 +404,7 @@ public class SebClientConnectionServiceImpl implements SebClientConnectionServic
.stream()) .stream())
.map(token -> cache.get(token, ClientConnectionDataInternal.class)) .map(token -> cache.get(token, ClientConnectionDataInternal.class))
.filter(Objects::nonNull) .filter(Objects::nonNull)
.filter(connection -> connection.clientConnection.status == ConnectionStatus.ESTABLISHED)
.flatMap(connection -> connection.pingMappings.stream()) .flatMap(connection -> connection.pingMappings.stream())
.map(ping -> ping.updateLogEvent()) .map(ping -> ping.updateLogEvent())
.filter(Objects::nonNull) .filter(Objects::nonNull)

View file

@ -79,8 +79,8 @@ public class HTTPClientBot {
public HTTPClientBot(final Map<String, String> args) { public HTTPClientBot(final Map<String, String> args) {
// this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080"); this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080");
this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080"); // this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080");
//this.webserviceAddress = args.getOrDefault("webserviceAddress", "https://seb.test-swissmooc.ch"); //this.webserviceAddress = args.getOrDefault("webserviceAddress", "https://seb.test-swissmooc.ch");
this.accessTokenEndpoint = args.getOrDefault("accessTokenEndpoint", "/oauth/token"); this.accessTokenEndpoint = args.getOrDefault("accessTokenEndpoint", "/oauth/token");
@ -100,7 +100,7 @@ public class HTTPClientBot {
this.pingInterval = Long.parseLong(args.getOrDefault("pingInterval", "200")); this.pingInterval = Long.parseLong(args.getOrDefault("pingInterval", "200"));
this.errorInterval = Long.parseLong(args.getOrDefault("errorInterval", String.valueOf(TEN_SECONDS))); this.errorInterval = Long.parseLong(args.getOrDefault("errorInterval", String.valueOf(TEN_SECONDS)));
// this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_MINUTE))); // this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_MINUTE)));
this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_HOUR))); this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_MINUTE)));
this.connectionAttempts = Integer.parseInt(args.getOrDefault("connectionAttempts", "1")); this.connectionAttempts = Integer.parseInt(args.getOrDefault("connectionAttempts", "1"));
for (int i = 0; i < this.numberOfConnections; i++) { for (int i = 0; i < this.numberOfConnections; i++) {

View file

@ -6,7 +6,7 @@
</encoder> </encoder>
</appender> </appender>
<root level="WARN" additivity="true"> <root level="INFO" additivity="true">
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
</root> </root>
</configuration> </configuration>