Просмотр исходного кода

提交定时任务配置信息

tags/v1.0.0^2
wanjing 1 год назад
Родитель
Сommit
311d503225
4 измененных файлов: 9 добавлений и 9 удалений
  1. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/task/AirportTask.java
  2. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/resources/application-dev.yml
  3. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/resources/application-prod.yml
  4. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/resources/application-test.yml

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/task/AirportTask.java Просмотреть файл

@@ -19,6 +19,7 @@ import com.tuoheng.common.core.utils.HttpUtils;
import com.tuoheng.common.core.utils.JacksonUtil;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -43,8 +44,7 @@ public class AirportTask {
@Autowired
private TenantMapper tenantMapper;

// @Scheduled(fixedRate = 60000)
// @XxlJob("airportTaskHandler")
@XxlJob("freewayAirportTaskHandler")
public void airportTaskHandler() {
//查询当前时间正负1分钟的时间跨度,xxljob执行频率为1分钟1次
long start = new Date().getTime() - 1 * 60000L;

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/resources/application-dev.yml Просмотреть файл

@@ -166,10 +166,10 @@ xxl:
addresses: http://192.168.11.11:8110/xxl-job-admin
accessToken: tuoheng
executor:
appname: xxl-job-executor-feishou
appname: xxl-job-executor-freeway
address:
ip:
# 多个后台,端口号不能相同
port: 9888
port: 9997
logpath: /data/java/logs/xxl-job/jobhandler
logretentiondays: 15

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/resources/application-prod.yml Просмотреть файл

@@ -164,13 +164,13 @@ xxl:
enable: true
job:
admin:
addresses: http://172.16.1.31:8110/xxl-job-admin
addresses: https://xxl-job.t-aaron.com/xxl-job-admin/
accessToken: tuoheng
executor:
appname: xxl-job-executor-feishou
appname: xxl-job-executor-freeway
address:
ip:
# 多个后台,端口号不能相同
port: 9888
port: 9997
logpath: /data/java/logs/xxl-job/jobhandler
logretentiondays: 15

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/resources/application-test.yml Просмотреть файл

@@ -167,10 +167,10 @@ xxl:
addresses: http://172.15.1.11:8110/xxl-job-admin
accessToken: tuoheng
executor:
appname: xxl-job-executor-feishou
appname: xxl-job-executor-freeway
address:
ip:
# 多个后台,端口号不能相同
port: 9888
port: 9997
logpath: /data/java/logs/xxl-job/jobhandler
logretentiondays: 15

Загрузка…
Отмена
Сохранить