mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
[opt] remove local and remote instance log clean config (use oms.instanceinfo.retention)
This commit is contained in:
parent
40d5dfc549
commit
598b010250
@ -35,17 +35,14 @@ public class CleanService {
|
||||
@Resource
|
||||
private WorkflowInstanceInfoRepository workflowInstanceInfoRepository;
|
||||
|
||||
@Value("${oms.log.retention.local}")
|
||||
private int localLogRetentionDay;
|
||||
@Value("${oms.log.retention.remote}")
|
||||
private int remoteLogRetentionDay;
|
||||
@Value("${oms.instanceinfo.retention}")
|
||||
private int instanceInfoRetentionDay;
|
||||
|
||||
@Value("${oms.container.retention.local}")
|
||||
private int localContainerRetentionDay;
|
||||
@Value("${oms.container.retention.remote}")
|
||||
private int remoteContainerRetentionDay;
|
||||
|
||||
@Value("${oms.instanceinfo.retention}")
|
||||
private int instanceInfoRetentionDay;
|
||||
|
||||
private static final int TEMPORARY_RETENTION_DAY = 3;
|
||||
|
||||
@ -65,12 +62,12 @@ public class CleanService {
|
||||
cleanWorkflowInstanceLog();
|
||||
|
||||
// 释放磁盘空间
|
||||
cleanLocal(OmsFileUtils.genLogDirPath(), localLogRetentionDay);
|
||||
cleanLocal(OmsFileUtils.genLogDirPath(), instanceInfoRetentionDay);
|
||||
cleanLocal(OmsFileUtils.genContainerJarPath(), localContainerRetentionDay);
|
||||
cleanLocal(OmsFileUtils.genTemporaryPath(), TEMPORARY_RETENTION_DAY);
|
||||
|
||||
// 删除 GridFS 过期文件
|
||||
cleanRemote(GridFsManager.LOG_BUCKET, remoteLogRetentionDay);
|
||||
cleanRemote(GridFsManager.LOG_BUCKET, instanceInfoRetentionDay);
|
||||
cleanRemote(GridFsManager.CONTAINER_BUCKET, remoteContainerRetentionDay);
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,9 @@ spring.mail.properties.mail.smtp.starttls.enable=true
|
||||
spring.mail.properties.mail.smtp.starttls.required=true
|
||||
|
||||
####### 资源清理配置 #######
|
||||
oms.log.retention.local=1
|
||||
oms.log.retention.remote=1
|
||||
oms.instanceinfo.retention=1
|
||||
oms.container.retention.local=1
|
||||
oms.container.retention.remote=-1
|
||||
oms.instanceinfo.retention=1
|
||||
|
||||
####### 缓存配置 #######
|
||||
oms.instance.metadata.cache.size=1024
|
@ -21,11 +21,9 @@ spring.mail.properties.mail.smtp.starttls.enable=true
|
||||
spring.mail.properties.mail.smtp.starttls.required=true
|
||||
|
||||
####### 资源清理配置 #######
|
||||
oms.log.retention.local=3
|
||||
oms.log.retention.remote=3
|
||||
oms.instanceinfo.retention=3
|
||||
oms.container.retention.local=3
|
||||
oms.container.retention.remote=-1
|
||||
oms.instanceinfo.retention=3
|
||||
|
||||
####### 缓存配置 #######
|
||||
oms.instance.metadata.cache.size=1024
|
@ -21,11 +21,9 @@ spring.mail.properties.mail.smtp.starttls.enable=true
|
||||
spring.mail.properties.mail.smtp.starttls.required=true
|
||||
|
||||
####### 资源清理配置 #######
|
||||
oms.log.retention.local=7
|
||||
oms.log.retention.remote=7
|
||||
oms.instanceinfo.retention=7
|
||||
oms.container.retention.local=7
|
||||
oms.container.retention.remote=-1
|
||||
oms.instanceinfo.retention=3
|
||||
|
||||
####### 缓存配置 #######
|
||||
oms.instance.metadata.cache.size=2048
|
Loading…
x
Reference in New Issue
Block a user