task-161: 巡检任务开关(aiimage.inspection.enabled 默认 disabled、cron 调度、分布式锁双实例去重、单巡检异常隔离、limit 透传)+ 8 条测试
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.nanri.aiimage.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 巡检任务配置(task-161)。
|
||||
* 全部巡检默认 disabled;启用后按调度间隔执行;limit 为单次巡检行数上限。
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "aiimage.inspection")
|
||||
public class InspectionProperties {
|
||||
|
||||
/** 巡检总开关(默认关闭)。 */
|
||||
private boolean enabled = false;
|
||||
|
||||
/** 调度 cron(默认凌晨 3 点)。 */
|
||||
private String cron = "0 0 3 * * *";
|
||||
|
||||
/** 单次巡检行数上限。 */
|
||||
private int limit = 200;
|
||||
}
|
||||
Reference in New Issue
Block a user