Skip to content

Commit 052c905

Browse files
update
1 parent 7fcffe5 commit 052c905

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

.idea/workspace.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/top/lingyuzhao/webSsh/service/impl/WebSSHServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void onDestroy() {
139139
this.onOnWebSshPro.getStorageConfig().end(objectMapper);
140140
}
141141

142-
@Scheduled(fixedRate = 3600000) // 每1小时执行一次
142+
@Scheduled(fixedRateString = "${on-on-web-ssh.scheduled.ssh-storage.interval}")
143143
public void scheduledCleanup() {
144144
this.onDestroy();
145145
}

src/main/resources/config/application.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ on-on-web-ssh:
5151
enable-writer: true
5252
# 持久化目录
5353
storage-dir: storage
54+
# 定时设置
55+
scheduled:
56+
# 设置 ssh 信息存储的时间间隔
57+
ssh-storage:
58+
interval: 3600000

target/WebSSH.jar.original

83 Bytes
Binary file not shown.

target/classes/config/application.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ on-on-web-ssh:
5151
enable-writer: true
5252
# 持久化目录
5353
storage-dir: storage
54+
# 定时设置
55+
scheduled:
56+
# 设置 ssh 信息存储的时间间隔
57+
ssh-storage:
58+
interval: 3600000

0 commit comments

Comments
 (0)