package com.nanri.aiimage.config; import com.nanri.aiimage.common.module.TaskModuleRegistry; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import java.util.ArrayList; import java.util.List; @Data @ConfigurationProperties(prefix = "aiimage.module-cleanup") public class ModuleCleanupProperties { private boolean enabled = true; private String cron = "0 0 0 * * *"; private long retentionDays = 7; /** * keyset 分页每批处理的任务数:每批一个短事务,批内按 id 升序, * 批间无行级排他锁占用;0/负值回退默认 500。 */ private int batchSize = 500; // SHOP_DATA_CRAWL keeps one per-shop daily workbook in its task service // and must not be removed by the age-based sweep. /** 参与按天清理的模块:取自模块注册表(G6)。 */ private List moduleTypes = new ArrayList<>(TaskModuleRegistry.ageCleanupModuleTypes()); }