[release] v3.4.7

This commit is contained in:
tjq 2021-02-23 00:56:47 +08:00
commit 611f8773e8
10 changed files with 21 additions and 33 deletions

View File

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

View File

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

View File

@ -20,7 +20,7 @@
<!-- 不会被打包的部分scope 只能是 test 或 provide --> <!-- 不会被打包的部分scope 只能是 test 或 provide -->
<junit.version>5.6.1</junit.version> <junit.version>5.6.1</junit.version>
<logback.version>1.2.3</logback.version> <logback.version>1.2.3</logback.version>
<powerjob.worker.version>3.4.6</powerjob.worker.version> <powerjob.worker.version>3.4.7</powerjob.worker.version>
<!-- 全部 shade 化,避免依赖冲突 --> <!-- 全部 shade 化,避免依赖冲突 -->
<fastjson.version>1.2.68</fastjson.version> <fastjson.version>1.2.68</fastjson.version>

View File

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

View File

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

View File

@ -17,7 +17,7 @@ import picocli.CommandLine.Option;
* @since 2020/5/20 * @since 2020/5/20
*/ */
@Slf4j @Slf4j
@Command(name = "OhMyAgent", mixinStandardHelpOptions = true, version = "3.4.3", description = "powerjob-worker agent") @Command(name = "OhMyAgent", mixinStandardHelpOptions = true, version = "3.4.7", description = "powerjob-worker agent")
public class MainApplication implements Runnable { public class MainApplication implements Runnable {
@Option(names = {"-a", "--app"}, description = "worker-agent's name", required = true) @Option(names = {"-a", "--app"}, description = "worker-agent's name", required = true)

View File

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

View File

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

View File

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

View File

@ -8,8 +8,6 @@ import com.github.kfcfans.powerjob.worker.log.OmsLogger;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.SystemUtils;
import java.io.*; import java.io.*;
import java.net.URL; import java.net.URL;
@ -46,9 +44,6 @@ public abstract class ScriptProcessor implements BasicProcessor {
File dir = new File(script.getParent()); File dir = new File(script.getParent());
boolean success = dir.mkdirs(); boolean success = dir.mkdirs();
if (!success) {
throw new RuntimeException("create script folder failed.");
}
success = script.createNewFile(); success = script.createNewFile();
if (!success) { if (!success) {
throw new RuntimeException("create script file failed"); throw new RuntimeException("create script file failed");
@ -76,17 +71,10 @@ public abstract class ScriptProcessor implements BasicProcessor {
omsLogger.info("SYSTEM===> ScriptProcessor start to process"); omsLogger.info("SYSTEM===> ScriptProcessor start to process");
if (SystemUtils.IS_OS_WINDOWS) {
if (StringUtils.equals(fetchRunCommand(), "/bin/bash")) {
omsLogger.warn("Current OS is {} where shell scripts cannot run.", SystemUtils.OS_NAME);
return new ProcessResult(false, "Shell scripts cannot run on Windows");
}
} else {
// 1. 授权 // 1. 授权
ProcessBuilder chmodPb = new ProcessBuilder("/bin/chmod", "755", scriptPath); ProcessBuilder chmodPb = new ProcessBuilder("/bin/chmod", "755", scriptPath);
// 等待返回这里不可能导致死锁shell产生大量数据可能导致死锁 // 等待返回这里不可能导致死锁shell产生大量数据可能导致死锁
chmodPb.start().waitFor(); chmodPb.start().waitFor();
}
// 2. 执行目标脚本 // 2. 执行目标脚本
ProcessBuilder pb = new ProcessBuilder(fetchRunCommand(), scriptPath); ProcessBuilder pb = new ProcessBuilder(fetchRunCommand(), scriptPath);