mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
从配置文件加载任务时,自定义ID避免重复从配置文件加载
This commit is contained in:
parent
8032f828fe
commit
cbb3592a70
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# 5.8.4.M1 (2022-06-26)
|
# 5.8.4.M1 (2022-06-27)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【extra 】 Sftp增加构造重载,支持超时(pr#653@Gitee)
|
* 【extra 】 Sftp增加构造重载,支持超时(pr#653@Gitee)
|
||||||
@ -16,6 +16,7 @@
|
|||||||
* 【core 】 LocalDateTimeUtil.parse改为blank检查(issue#I5CZJ9@Gitee)
|
* 【core 】 LocalDateTimeUtil.parse改为blank检查(issue#I5CZJ9@Gitee)
|
||||||
* 【core 】 BeanPath在空元素时默认加入map,修改根据下标类型赋值List or map(issue#2362@Github)
|
* 【core 】 BeanPath在空元素时默认加入map,修改根据下标类型赋值List or map(issue#2362@Github)
|
||||||
* 【core 】 localAddressList 添加重构方法(pr#665@Gitee)
|
* 【core 】 localAddressList 添加重构方法(pr#665@Gitee)
|
||||||
|
* 【cron 】 从配置文件加载任务时,自定义ID避免重复从配置文件加载(issue#I5E7BM@Gitee)
|
||||||
*
|
*
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【extra 】 修复createExtractor中抛出异常后流未关闭问题(pr#2384@Github)
|
* 【extra 】 修复createExtractor中抛出异常后流未关闭问题(pr#2384@Github)
|
||||||
|
@ -211,7 +211,8 @@ public class Scheduler implements Serializable {
|
|||||||
final String pattern = entry.getValue();
|
final String pattern = entry.getValue();
|
||||||
StaticLog.debug("Load job: {} {}", pattern, jobClass);
|
StaticLog.debug("Load job: {} {}", pattern, jobClass);
|
||||||
try {
|
try {
|
||||||
schedule(pattern, new InvokeTask(jobClass));
|
// issue#I5E7BM@Gitee,自定义ID避免重复从配置文件加载
|
||||||
|
schedule("id_" + jobClass, pattern, new InvokeTask(jobClass));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new CronException(e, "Schedule [{}] [{}] error!", pattern, jobClass);
|
throw new CronException(e, "Schedule [{}] [{}] error!", pattern, jobClass);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user