feat(REQ-3714) 工人退场流程优化 - xxl-job config
This commit is contained in:
parent
12f3d89efd
commit
517a5c25bc
@ -0,0 +1,66 @@
|
||||
package cn.axzo.orgmanax.infra.config;
|
||||
|
||||
import cn.azxo.framework.common.annotation.OnlyPodsEnvironment;
|
||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* xxl-job config
|
||||
*
|
||||
* @author xuxueli 2017-04-28
|
||||
*/
|
||||
@OnlyPodsEnvironment
|
||||
@Configuration(value = "xxlJobConfig1")
|
||||
public class XxlJobConfig {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
|
||||
|
||||
/**
|
||||
* //@Value("http://dev-xxl-job.axzo.cn/xxl-job-admin")
|
||||
*/
|
||||
@Value("${xxl.job.admin.addresses}")
|
||||
private String adminAddresses;
|
||||
|
||||
@Value("${xxl.job.executor.appname}")
|
||||
private String appName;
|
||||
|
||||
@Value("")
|
||||
private String ip;
|
||||
|
||||
@Value("${xxl.job.executor.port}")
|
||||
private int port;
|
||||
|
||||
|
||||
/**
|
||||
* // @Value("${xxl.job.accessToken}")
|
||||
*/
|
||||
@Value("")
|
||||
private String accessToken;
|
||||
|
||||
@Value("")
|
||||
private String logPath;
|
||||
|
||||
@Value("-1")
|
||||
private int logRetentionDays;
|
||||
|
||||
@Bean
|
||||
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||
logger.info(">>>>>>>>>>> xxl-job config init.");
|
||||
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
|
||||
xxlJobSpringExecutor.setAppname(appName);
|
||||
xxlJobSpringExecutor.setIp(ip);
|
||||
xxlJobSpringExecutor.setPort(port);
|
||||
xxlJobSpringExecutor.setAccessToken(accessToken);
|
||||
xxlJobSpringExecutor.setLogPath(logPath);
|
||||
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
|
||||
|
||||
return xxlJobSpringExecutor;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* @author luofu
|
||||
* @version 1.0
|
||||
* @description 自动退场OR标记为离场人员的JOB
|
||||
* @description 自动给工人打离场标签的JOB
|
||||
* @date 2025/3/6
|
||||
*/
|
||||
@Slf4j
|
||||
|
||||
@ -56,7 +56,7 @@ public abstract class BaseAutoOperatePersonLeavedTagJob<T> extends IJobHandler {
|
||||
// init context
|
||||
context = Context.instance(param);
|
||||
long scrollIndex = Long.MAX_VALUE;
|
||||
info("start to scan org_user.");
|
||||
info("start to scan data records.");
|
||||
// key: workspaceId value: records
|
||||
Map<Long, List<T>> localCache = Maps.newHashMap();
|
||||
List<T> records = scrollList(scrollIndex);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user