Skip to content

Commit

Permalink
Merge branch 'release/3.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
msqr committed Jan 12, 2024
2 parents aba39aa + 47ea728 commit a9f77dd
Show file tree
Hide file tree
Showing 26 changed files with 87 additions and 39 deletions.
2 changes: 1 addition & 1 deletion solarnet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ subprojects {
jsonSchemaValidatorVersion = '1.0.73'
myBatisStarterVersion = '3.0.3'
snCommonVersion = '3.5.2'
snCommonMqttVersion = '4.0.0'
snCommonMqttVersion = '4.0.1'
snCommonMqttNettyVersion = '3.0.1'
snCommonOcppVersion = '2.7.0'
snCommonOcpp16Version = '2.1.7'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/common-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
4 changes: 2 additions & 2 deletions solarnet/datum/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand All @@ -14,7 +14,7 @@ dependencyManagement {
}

description = 'SolarNet: Datum'
version = '2.1.0'
version = '2.2.0'

base {
archivesName = 'solarnet-datum'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* Publish datum to SolarFlux.
*
* @author matt
* @version 2.1
* @version 2.2
*/
public class SolarFluxDatumPublisher extends MqttJsonPublisher<Identity<GeneralNodeDatumPK>>
implements DatumProcessor {
Expand All @@ -65,7 +65,13 @@ public class SolarFluxDatumPublisher extends MqttJsonPublisher<Identity<GeneralN
*/
public static final String NODE_AGGREGATE_DATUM_TOPIC_TEMPLATE = "user/%d/node/%d/datum/%s/%s";

/** The {@code errorLogLimitMs} property default value. */
public static final long ERROR_LOG_LIMIT_MS_DEFAULT = 60_000L;

private final SolarNodeOwnershipDao supportDao;
private long errorLogLimitMs = ERROR_LOG_LIMIT_MS_DEFAULT;

private long lastErrorTime = 0; // ignoring thread safety for performance

/**
* Constructor.
Expand Down Expand Up @@ -141,18 +147,34 @@ public boolean processDatumCollection(Iterable<? extends Identity<GeneralNodeDat
while ( root.getCause() != null ) {
root = root.getCause();
}
if ( (root instanceof RemoteServiceException)
|| (root instanceof net.solarnetwork.service.RemoteServiceException) ) {
log.error("Error publishing {} datum to SolarFlux: {}", aggDisplayName(aggregation),
root.getMessage());
if ( errorLogLimitMs > 0 ) {
final long now = System.currentTimeMillis();
final long tdiff = errorLogLimitMs > 0 ? now - lastErrorTime : lastErrorTime;
if ( tdiff >= lastErrorTime ) {
logPublishError(e, root, aggregation);
lastErrorTime = now;
} else {
log.debug("Problem publishing {} datum to SolarFlux: {}",
aggDisplayName(aggregation), root.getMessage());
}
} else {
log.error("Error publishing {} datum to SolarFlux: {}", aggDisplayName(aggregation),
root.toString(), e);
logPublishError(e, root, aggregation);
}
}
return false;
}

private void logPublishError(Throwable e, Throwable root, Aggregation aggregation) {
if ( (root instanceof RemoteServiceException)
|| (root instanceof net.solarnetwork.service.RemoteServiceException) ) {
log.warn("Problem publishing {} datum to SolarFlux: {}", aggDisplayName(aggregation),
root.getMessage());
} else {
log.error("Problem publishing {} datum to SolarFlux: {}", aggDisplayName(aggregation),
root.toString(), e);
}
}

private static String aggDisplayName(Aggregation aggregation) {
return aggregation == Aggregation.None ? "Raw" : aggregation.toString();
}
Expand Down Expand Up @@ -194,4 +216,25 @@ private String topicForDatum(Aggregation aggregation, Identity<GeneralNodeDatumP
return String.format(NODE_AGGREGATE_DATUM_TOPIC_TEMPLATE, ownership.getUserId(), nodeId,
aggregation.getKey(), sourceId);
}

/**
* Get the error log limit.
*
* @return the milliseconds to limit error log message to, or 0 for no
* limit; defaults to {@link #ERROR_LOG_LIMIT_MS_DEFAULT}
*/
public long getErrorLogLimitMs() {
return errorLogLimitMs;
}

/**
* Set the error log limit.
*
* @param errorLogLimitMs
* the milliseconds to limit error log message to, or 0 for no limit
*/
public void setErrorLogLimitMs(long errorLogLimitMs) {
this.errorLogLimitMs = errorLogLimitMs;
}

}
2 changes: 1 addition & 1 deletion solarnet/dnp3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/instructor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/net-proxy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/ocpp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
4 changes: 2 additions & 2 deletions solarnet/oscp-fp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

description = 'SolarOSCP Flexibility Provider'
version = '2.1.0'
version = '2.1.1'

base {
archivesName = 'solaroscp-fp'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/oscp-sim-cp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/oscp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
4 changes: 2 additions & 2 deletions solarnet/solardnp3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

description = 'SolarDNP3'
version = '2.1.0'
version = '2.1.1'

base {
archivesName = 'solardnp3'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/solarflux-vernemq-webhook/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ spring:
validationInterval: 35000
removeAbandoned: true
removeAbandonedTimeout: 600
jdbcInterceptors: "ConnectionState;StatementCache(prepared=true,callable=false,max=50);ResetAbandonedTimer"
jackson:
default-property-inclusion: non_null

Expand All @@ -38,6 +37,7 @@ logging:
file: "%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:%5p} %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}"
level:
net.solarnetwork: DEBUG
org.apache.tomcat: TRACE

debugMode: true

Expand All @@ -48,6 +48,8 @@ spring:
url: jdbc:postgresql://localhost:5412/solarnetwork
username: solarauth
password: solarauth
tomcat:
jdbcInterceptors: "ConnectionState;StatementCache(prepared=true,callable=false,max=50);ResetAbandonedTimer"

debugMode: true

Expand All @@ -58,6 +60,9 @@ logging:
---
spring:
config.activate.on-profile: production
datasource:
tomcat:
jdbcInterceptors: "ConnectionState;StatementCache(prepared=true,callable=false,max=50);ResetAbandonedTimer"

debugMode: false

Expand Down
4 changes: 2 additions & 2 deletions solarnet/solarin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

description = 'SolarIn'
version = '2.1.0'
version = '2.1.1'

base {
archivesName = 'solarin'
Expand Down
4 changes: 2 additions & 2 deletions solarnet/solarjobs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

description = 'SolarJobs'
version = '2.1.0'
version = '2.1.1'

base {
archivesName = 'solarjobs'
Expand Down
4 changes: 2 additions & 2 deletions solarnet/solarocpp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

description = 'SolarOCPP'
version = '2.1.0'
version = '2.1.1'

base {
archivesName = 'solarocpp'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/solarquery/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

apply plugin: 'java'
Expand Down
4 changes: 2 additions & 2 deletions solarnet/solaruser/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
//id 'checkstyle'
id 'java'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0'
id 'org.springframework.boot' version '3.2.1'
}

//apply plugin: 'checkstyle'
Expand All @@ -11,7 +11,7 @@ apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

description = 'SolarUser'
version = '2.1.0'
version = '2.1.1'

base {
archivesName = 'solaruser'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/user-billing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/user-datum/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/user-dnp3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/user-ocpp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
2 changes: 1 addition & 1 deletion solarnet/user-oscp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'eclipse'
id 'org.springframework.boot' version '3.2.0' apply false
id 'org.springframework.boot' version '3.2.1' apply false
}

apply plugin: 'java-library'
Expand Down
Loading

0 comments on commit a9f77dd

Please sign in to comment.