add 新增 ruoyi-powerjob-server 整合 powerjob 框架

update 重构 ruoyi-job 适配 powerjob
remove 移除 xxljob 建议使用 powerjob
This commit is contained in:
疯狂的狮子Li
2023-06-29 12:16:13 +08:00
parent 68d1742da1
commit 65351030ef
206 changed files with 918 additions and 39278 deletions

View File

@@ -3,6 +3,7 @@ spring:
dynamic:
# 设置默认的数据源或者数据源组,默认值即为 master
primary: master
seata: false
datasource:
# 主库数据源
master:

View File

@@ -3,6 +3,7 @@ spring:
dynamic:
# 设置默认的数据源或者数据源组,默认值即为 master
primary: master
seata: false
datasource:
# 主库数据源
master:
@@ -12,27 +13,20 @@ spring:
username: ${datasource.job.username}
password: ${datasource.job.password}
xxl:
job:
# 执行器开关
# powerjob 配置
powerjob:
worker:
# 如何开启调度中心请查看文档教程
enabled: true
# 需要先在 powerjob 登录页执行应用注册后才能使用
app-name: ruoyi-worker
enable-test-mode: false
max-appended-wf-context-length: 4096
max-result-length: 4096
port: 27777
protocol: http
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
# admin-addresses: http://localhost:9900
# 调度中心应用名 通过服务名连接调度中心(启用admin-appname会导致admin-addresses不生效)
admin-appname: ruoyi-xxl-job-admin
# 执行器通讯TOKEN非空时启用
access-token: xxl-job
# 执行器配置
executor:
# 执行器AppName执行器心跳注册分组依据为空则关闭自动注册
appname: ${spring.application.name}-executor
# 执行器端口号 执行器从19901开始往后写
port: 9901
# 执行器注册默认IP:PORT
address:
# 执行器IP默认自动获取IP
ip:
# 执行器运行日志文件存储磁盘路径
logpath: ./logs/${spring.application.name}/xxl-job
# 执行器日志文件保存天数大于3生效
logretentiondays: 30
# server-address: 127.0.0.1:7700
# 调度中心应用名 通过服务名连接调度中心(启用 server-name 会导致 server-address 不生效)
server-name: ruoyi-powerjob-server
store-strategy: disk

View File

@@ -0,0 +1,47 @@
oms.env=${spring.profiles.active}
####### Database properties(Configure according to the the environment) #######
spring.datasource.core.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.core.jdbc-url=${datasource.job.url}
spring.datasource.core.username=${datasource.job.username}
spring.datasource.core.password=${datasource.job.password}
spring.datasource.core.maximum-pool-size=20
spring.datasource.core.minimum-idle=5
####### MongoDB properties(Non-core configuration properties) #######
####### delete mongodb config to disable mongodb #######
oms.mongodb.enable=false
#spring.data.mongodb.uri=mongodb+srv://zqq:No1Bug2Please3!@cluster0.wie54.gcp.mongodb.net/powerjob_daily?retryWrites=true&w=majority
####### Email properties(Non-core configuration properties) #######
####### Delete the following code to disable the mail #######
#spring.mail.host=smtp.163.com
#spring.mail.username=zqq@163.com
#spring.mail.password=GOFZPNARMVKCGONV
#spring.mail.properties.mail.smtp.auth=true
#spring.mail.properties.mail.smtp.starttls.enable=true
#spring.mail.properties.mail.smtp.starttls.required=true
####### DingTalk properties(Non-core configuration properties) #######
####### Delete the following code to disable the DingTalk #######
#oms.alarm.ding.app-key=dingauqwkvxxnqskknfv
#oms.alarm.ding.app-secret=XWrEPdAZMPgJeFtHuL0LH73LRj-74umF2_0BFcoXMfvnX0pCQvt0rpb1JOJU_HLl
#oms.alarm.ding.agent-id=847044348
####### Resource cleaning properties #######
oms.instanceinfo.retention=1
oms.container.retention.local=1
oms.container.retention.remote=-1
####### Cache properties #######
oms.instance.metadata.cache.size=1024
# 生产配置
#oms.instanceinfo.retention=7
#oms.container.retention.local=7
#oms.container.retention.remote=-1
#oms.instance.metadata.cache.size=2048
####### Threshold in precise fetching server(0~100). 100 means full detection of server, in which #######
####### split-brain could be avoided while performance overhead would increase. #######
oms.accurate.select.server.percentage = 50

View File

@@ -1,67 +0,0 @@
# server 配置
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${datasource.job.url}
username: ${datasource.job.username}
password: ${datasource.job.password}
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 10000
idle-timeout: 30000
max-lifetime: 900000
maximum-pool-size: 30
minimum-idle: 10
pool-name: HikariCP
validation-timeout: 1000
mail:
from: xxx@qq.com
host: smtp.qq.com
username: xxx@qq.com
password: xxx
port: 25
properties:
mail:
smtp:
auth: true
socketFactory:
class: javax.net.ssl.SSLSocketFactory
starttls:
enable: true
required: true
# mybatis 配置
mybatis:
mapper-locations: classpath:/mybatis-mapper/*Mapper.xml
# Actuator 监控端点的配置项
management:
health:
mail:
enabled: false
endpoints:
web:
exposure:
include: '*'
endpoint:
health:
show-details: ALWAYS
logfile:
external-file: ./logs/${spring.application.name}/console.log
# xxljob系统配置
xxl:
job:
# 鉴权token
accessToken: xxl-job
# 国际化
i18n: zh_CN
# 日志清理
logretentiondays: 30
triggerpool:
fast:
max: 200
slow:
max: 100

View File

@@ -1,8 +1,6 @@
service.vgroupMapping.ruoyi-auth-group=default
service.vgroupMapping.ruoyi-system-group=default
service.vgroupMapping.ruoyi-resource-group=default
service.vgroupMapping.ruoyi-gen-group=default
service.vgroupMapping.ruoyi-job-group=default
service.enableDegrade=false
service.disableGlobalTransaction=false