mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-03 11:05:58 +00:00
add 新增 ruoyi-powerjob-server 整合 powerjob 框架
update 重构 ruoyi-job 适配 powerjob remove 移除 xxljob 建议使用 powerjob
This commit is contained in:
@@ -3,6 +3,7 @@ spring:
|
||||
dynamic:
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
seata: false
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
|
@@ -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
|
||||
|
47
config/nacos/ruoyi-powerjob-server.properties
Normal file
47
config/nacos/ruoyi-powerjob-server.properties
Normal 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
|
@@ -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
|
@@ -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
|
||||
|
Reference in New Issue
Block a user