Merge remote-tracking branch 'origin/v3.4.8' into jenkins_auto_build

This commit is contained in:
tjq 2021-03-07 22:56:10 +08:00
commit 63c8a455f7
12 changed files with 37 additions and 21 deletions

View File

@ -10,13 +10,13 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-client</artifactId>
<version>3.4.7</version>
<version>3.4.8</version>
<packaging>jar</packaging>
<properties>
<junit.version>5.6.1</junit.version>
<fastjson.version>1.2.68</fastjson.version>
<powerjob.common.version>3.4.7</powerjob.common.version>
<powerjob.common.version>3.4.8</powerjob.common.version>
<mvn.shade.plugin.version>3.2.4</mvn.shade.plugin.version>
</properties>

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-common</artifactId>
<version>3.4.7</version>
<version>3.4.8</version>
<packaging>jar</packaging>
<properties>

View File

@ -16,6 +16,8 @@ public class PowerJobDKey {
*/
public static final String PREFERRED_NETWORK_INTERFACE = "powerjob.network.interface.preferred";
public static final String BIND_LOCAL_ADDRESS = "powerjob.network.local.address";
/**
* Java regular expressions for network interfaces that will be ignored.
*/

View File

@ -60,6 +60,12 @@ public class NetUtils {
return HOST_ADDRESS;
}
String addressFromJVM = System.getProperty(PowerJobDKey.BIND_LOCAL_ADDRESS);
if (StringUtils.isNotEmpty(addressFromJVM)) {
log.info("[Net] use address from[{}]: {}", PowerJobDKey.BIND_LOCAL_ADDRESS, addressFromJVM);
return HOST_ADDRESS = addressFromJVM;
}
InetAddress address = getLocalAddress();
if (address != null) {
return HOST_ADDRESS = address.getHostAddress();

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-official-processors</artifactId>
<version>1.0.1</version>
<version>1.0.3</version>
<packaging>jar</packaging>
<properties>
@ -23,6 +23,7 @@
<powerjob.worker.version>3.4.7</powerjob.worker.version>
<!-- 全部 shade 化,避免依赖冲突 -->
<slf4j.version>1.7.30</slf4j.version>
<fastjson.version>1.2.68</fastjson.version>
<okhttp.version>3.14.9</okhttp.version>
<guava.version>29.0-jre</guava.version>
@ -31,6 +32,13 @@
<dependencies>
<!-- slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- fastJson(used for serialization of DAG) -->
<dependency>
<groupId>com.alibaba</groupId>

View File

@ -19,16 +19,16 @@ import tech.powerjob.official.processors.util.CommonUtils;
public abstract class CommonBasicProcessor implements BasicProcessor {
@Override
public ProcessResult process(TaskContext taskContext) throws Exception {
public ProcessResult process(TaskContext ctx) throws Exception {
String status = "unknown";
Stopwatch sw = Stopwatch.createStarted();
OmsLogger omsLogger = taskContext.getOmsLogger();
omsLogger.info("using params: {}", CommonUtils.parseParams(taskContext));
OmsLogger omsLogger = ctx.getOmsLogger();
omsLogger.info("using params: {}", CommonUtils.parseParams(ctx));
try {
ProcessResult result = process0(taskContext);
ProcessResult result = process0(ctx);
omsLogger.info("execute succeed, using {}, result: {}", sw, result);
status = result.isSuccess() ? "succeed" : "failed";
return result;
@ -37,7 +37,7 @@ public abstract class CommonBasicProcessor implements BasicProcessor {
omsLogger.error("execute failed!", t);
return new ProcessResult(false, ExceptionUtils.getMessage(t));
} finally {
log.info("status: {}, cost: {}", status, sw);
log.info("{}|{}|{}|{}|{}", getClass().getSimpleName(), ctx.getJobId(), ctx.getInstanceId(), status, sw);
}
}

View File

@ -10,13 +10,13 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-server</artifactId>
<version>3.4.7</version>
<version>3.4.8</version>
<packaging>jar</packaging>
<properties>
<swagger.version>2.9.2</swagger.version>
<springboot.version>2.3.4.RELEASE</springboot.version>
<powerjob.common.version>3.4.7</powerjob.common.version>
<powerjob.common.version>3.4.8</powerjob.common.version>
<!-- MySQL version that corresponds to spring-boot-dependencies version. -->
<mysql.version>8.0.19</mysql.version>
<ojdbc.version>19.7.0.0</ojdbc.version>

View File

@ -3,7 +3,7 @@ logging.config=classpath:logback-dev.xml
####### Database properties(Configure according to the the environment) #######
spring.datasource.core.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.core.jdbc-url=jdbc:mysql://localhost:3307/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
spring.datasource.core.jdbc-url=jdbc:mysql://localhost:3306/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
spring.datasource.core.username=root
spring.datasource.core.password=No1Bug2Please3!
spring.datasource.core.hikari.maximum-pool-size=20

View File

@ -10,18 +10,18 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-worker-agent</artifactId>
<version>3.4.7</version>
<version>3.4.8</version>
<packaging>jar</packaging>
<properties>
<powerjob.worker.version>3.4.7</powerjob.worker.version>
<powerjob.worker.version>3.4.8</powerjob.worker.version>
<logback.version>1.2.3</logback.version>
<picocli.version>4.3.2</picocli.version>
<spring.boot.version>2.2.6.RELEASE</spring.boot.version>
<powerjob.official.processors.version>1.0.1</powerjob.official.processors.version>
<powerjob.official.processors.version>1.0.3</powerjob.official.processors.version>
</properties>
<dependencies>

View File

@ -10,11 +10,11 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-worker-samples</artifactId>
<version>3.4.7</version>
<version>3.4.8</version>
<properties>
<springboot.version>2.2.6.RELEASE</springboot.version>
<powerjob.worker.starter.version>3.4.7</powerjob.worker.starter.version>
<powerjob.worker.starter.version>3.4.8</powerjob.worker.starter.version>
<fastjson.version>1.2.68</fastjson.version>
<!-- 部署时跳过该module -->

View File

@ -10,11 +10,11 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-worker-spring-boot-starter</artifactId>
<version>3.4.7</version>
<version>3.4.8</version>
<packaging>jar</packaging>
<properties>
<powerjob.worker.version>3.4.7</powerjob.worker.version>
<powerjob.worker.version>3.4.8</powerjob.worker.version>
<springboot.version>2.2.6.RELEASE</springboot.version>
</properties>

View File

@ -10,12 +10,12 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>powerjob-worker</artifactId>
<version>3.4.7</version>
<version>3.4.8</version>
<packaging>jar</packaging>
<properties>
<spring.version>5.2.4.RELEASE</spring.version>
<powerjob.common.version>3.4.7</powerjob.common.version>
<powerjob.common.version>3.4.8</powerjob.common.version>
<h2.db.version>1.4.200</h2.db.version>
<hikaricp.version>3.4.2</hikaricp.version>
<junit.version>5.6.1</junit.version>