mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
[release] v1.1.1
This commit is contained in:
parent
5f2065f5ef
commit
2c030c23cf
@ -19,6 +19,9 @@
|
|||||||
<oms.common.version>1.1.1</oms.common.version>
|
<oms.common.version>1.1.1</oms.common.version>
|
||||||
<mysql.version>8.0.19</mysql.version>
|
<mysql.version>8.0.19</mysql.version>
|
||||||
<h2.db.version>1.4.200</h2.db.version>
|
<h2.db.version>1.4.200</h2.db.version>
|
||||||
|
|
||||||
|
<!-- 部署时跳过该module -->
|
||||||
|
<maven.deploy.skip>true</maven.deploy.skip>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
大坑记录:`~/logs`不会在用户目录下创建文件夹,而是在项目目录下创建名为~的文件夹
|
大坑记录:`~/logs`不会在用户目录下创建文件夹,而是在项目目录下创建名为~的文件夹
|
||||||
-->
|
-->
|
||||||
<property name="LOG_PATH" value="/home/logs"/>
|
<property name="LOG_PATH" value="/home/logs"/>
|
||||||
<!-- <property name="LOG_PATH" value="/Users/tjq/logs/oms-server"/>-->
|
<!-- <property name="LOG_PATH" value="/Users/tjq/logs/oms-server"/>-->
|
||||||
|
|
||||||
<!-- 系统所有异常日志(ERROR)双写 start -->
|
<!-- 系统所有异常日志(ERROR)双写 start -->
|
||||||
<appender name="ERROR_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="ERROR_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
<springboot.version>2.2.6.RELEASE</springboot.version>
|
<springboot.version>2.2.6.RELEASE</springboot.version>
|
||||||
<oms.worker.version>1.1.1</oms.worker.version>
|
<oms.worker.version>1.1.1</oms.worker.version>
|
||||||
<fastjson.version>1.2.68</fastjson.version>
|
<fastjson.version>1.2.68</fastjson.version>
|
||||||
|
|
||||||
|
<!-- 部署时跳过该module -->
|
||||||
|
<maven.deploy.skip>true</maven.deploy.skip>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## 快速开始
|
## 快速开始
|
||||||
>OpenAPI允许开发者通过接口来完成手工的操作,让系统整体变得更加灵活,启用OpenAPI需要依赖`oh-my-scheduler-client`库。
|
>OpenAPI允许开发者通过接口来完成手工的操作,让系统整体变得更加灵活,启用OpenAPI需要依赖`oh-my-scheduler-client`库。
|
||||||
|
|
||||||
最新依赖版本请参考Maven中央仓库:[推荐地址](https://search.maven.org/search?q=com.github.kfcfans)&[备用地址](https://mvnrepository.com/search?q=com.github.kfcfans)。
|
最新依赖版本请参考Maven中央仓库:[推荐地址](https://search.maven.org/search?q=oh-my-scheduler-client)&[备用地址](https://mvnrepository.com/search?q=com.github.kfcfans)。
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -25,8 +25,10 @@ ohMyClient.stopInstance(1586855173043L)
|
|||||||
## 功能列表
|
## 功能列表
|
||||||
#### 创建/修改任务
|
#### 创建/修改任务
|
||||||
接口签名:`ResultDTO<Long> saveJob(ClientJobInfo newJobInfo)`
|
接口签名:`ResultDTO<Long> saveJob(ClientJobInfo newJobInfo)`
|
||||||
入参:任务信息(详细说明见下表)
|
|
||||||
返回值:任务ID
|
入参:任务信息(详细说明见下表,也可以参考[前端任务创建各参数的正确填法](./ConsoleGuide.md))
|
||||||
|
|
||||||
|
返回值:ResultDTO<Long>,根据success判断操作是否成功。若操作成功,data字段返回任务ID
|
||||||
|
|
||||||
|属性|说明|
|
|属性|说明|
|
||||||
|----|----|
|
|----|----|
|
||||||
@ -52,17 +54,58 @@ ohMyClient.stopInstance(1586855173043L)
|
|||||||
|notifyUserIds|接收报警的用户ID列表|
|
|notifyUserIds|接收报警的用户ID列表|
|
||||||
|enable|是否启用该任务,未启用的任务不会被调度|
|
|enable|是否启用该任务,未启用的任务不会被调度|
|
||||||
|
|
||||||
|
#### 查找任务
|
||||||
|
接口签名:`ResultDTO<JobInfoDTO> fetchJob(Long jobId)`
|
||||||
|
|
||||||
|
入参:任务ID
|
||||||
|
|
||||||
|
返回值:根据success判断操作是否成功,若请求成功则返回任务的详细信息
|
||||||
|
|
||||||
#### 禁用某个任务
|
#### 禁用某个任务
|
||||||
接口签名:`ResultDTO<Void> disableJob(Long jobId)`
|
接口签名:`ResultDTO<Void> disableJob(Long jobId)`
|
||||||
|
|
||||||
入参:任务ID
|
入参:任务ID
|
||||||
返回值:无
|
|
||||||
|
返回值:根据success判断操作是否成功
|
||||||
|
|
||||||
|
#### 启用某个任务
|
||||||
|
接口签名:`ResultDTO<Void> enableJob(Long jobId)`
|
||||||
|
|
||||||
|
入参:任务ID
|
||||||
|
|
||||||
|
返回值:根据success判断操作是否成功
|
||||||
|
|
||||||
#### 删除某个任务
|
#### 删除某个任务
|
||||||
接口签名:`ResultDTO<Void> deleteJob(Long jobId)`
|
接口签名:`ResultDTO<Void> deleteJob(Long jobId)`
|
||||||
|
|
||||||
入参:任务ID
|
入参:任务ID
|
||||||
返回值:无
|
|
||||||
|
返回值:根据success判断操作是否成功
|
||||||
|
|
||||||
#### 立即运行某个任务
|
#### 立即运行某个任务
|
||||||
接口签名:`ResultDTO<Long> runJob(Long jobId, String instanceParams)`
|
接口签名:`ResultDTO<Long> runJob(Long jobId, String instanceParams)`
|
||||||
|
|
||||||
入参:任务ID + **任务实例参数**(Processor#process方法入参`TaskContext`对象的instanceParams字段)
|
入参:任务ID + **任务实例参数**(Processor#process方法入参`TaskContext`对象的instanceParams字段)
|
||||||
返回值:对应的任务实例ID(instanceId)
|
|
||||||
|
返回值:根据success判断操作是否成功,操作成功返回对应的任务实例ID(instanceId)
|
||||||
|
|
||||||
|
#### 停止某个任务实例
|
||||||
|
接口签名:`ResultDTO<Void> stopInstance(Long instanceId)`
|
||||||
|
|
||||||
|
入参:任务实例ID
|
||||||
|
|
||||||
|
返回值:根据success判断操作是否成功
|
||||||
|
|
||||||
|
#### 查询某个任务实例
|
||||||
|
接口签名:`ResultDTO<InstanceInfoDTO> fetchInstanceInfo(Long instanceId)`
|
||||||
|
|
||||||
|
入参:任务实例ID
|
||||||
|
|
||||||
|
返回值:根据success判断操作是否成功,操作成功返回任务实例的详细信息
|
||||||
|
|
||||||
|
#### 查询某个任务实例的状态
|
||||||
|
接口签名:`ResultDTO<Integer> fetchInstanceStatus(Long instanceId)`
|
||||||
|
|
||||||
|
入参:任务实例ID
|
||||||
|
|
||||||
|
返回值:根据success判断操作是否成功,操作成功返回任务实例的状态码,对应的枚举为:InstanceStatus
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## 宿主应用接入
|
## 宿主应用接入
|
||||||
#### 添加依赖
|
#### 添加依赖
|
||||||
* 最新依赖版本请参考Maven中央仓库:[推荐地址](https://search.maven.org/search?q=com.github.kfcfans)&[备用地址](https://mvnrepository.com/search?q=com.github.kfcfans)。
|
* 最新依赖版本请参考Maven中央仓库:[推荐地址](https://search.maven.org/search?q=oh-my-scheduler-worker)&[备用地址](https://mvnrepository.com/search?q=com.github.kfcfans)。
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
* 注2:手动建表SQL文件:[oms-sql.sql](../oms-sql.sql)
|
* 注2:手动建表SQL文件:[oms-sql.sql](../oms-sql.sql)
|
||||||
|
|
||||||
2. 部署调度服务器(OhMyScheduler-Server),需要先修改配置文件(同样为了支持多环境部署,采用了daily、pre和product3套配置文件),之后自行编译部署运行。
|
2. 部署调度服务器(OhMyScheduler-Server),需要先修改配置文件(同样为了支持多环境部署,采用了daily、pre和product3套配置文件),之后自行编译部署运行。
|
||||||
* 注:OhMyScheduler-Server支持集群部署,具备完全的水平扩展能力。建议部署多个实例以实现高可用&高性能。
|
* 注1:OhMyScheduler-Server支持集群部署,具备完全的水平扩展能力。建议部署多个实例以实现高可用&高性能。
|
||||||
|
* 注2:通过启动参数`--spring.profiles.active=product`来指定使用某套配置文件(默认为daily)
|
||||||
* application-xxx.properties文件配置说明如下表所示:
|
* application-xxx.properties文件配置说明如下表所示:
|
||||||
* |配置项|含义|可选|
|
* |配置项|含义|可选|
|
||||||
|----|----|----|
|
|----|----|----|
|
||||||
|
8
pom.xml
8
pom.xml
@ -106,8 +106,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Implementation-Title>${artifactId}</Implementation-Title>
|
<Implementation-Title>${project.artifactId}</Implementation-Title>
|
||||||
<Implementation-Version>${version}</Implementation-Version>
|
<Implementation-Version>${project.version}</Implementation-Version>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -224,8 +224,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Implementation-Title>${artifactId}</Implementation-Title>
|
<Implementation-Title>${project.artifactId}</Implementation-Title>
|
||||||
<Implementation-Version>${version}</Implementation-Version>
|
<Implementation-Version>${project.version}</Implementation-Version>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user