Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-03 18:09:49 +08:00
parent c917626d47
commit 364b253082
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 3 additions and 2 deletions

View file

@ -326,6 +326,7 @@ func setEditor(c *gin.Context) {
model.Conf.Save()
if oldGenerateHistoryInterval != model.Conf.Editor.GenerateHistoryInterval {
model.GenerateFileHistory()
model.ChangeHistoryTick(editor.GenerateHistoryInterval)
}

View file

@ -54,11 +54,11 @@ func AutoGenerateFileHistory() {
ChangeHistoryTick(Conf.Editor.GenerateHistoryInterval)
for {
<-historyTicker.C
task.AppendTask(task.HistoryGenerateFile, generateFileHistory)
task.AppendTask(task.HistoryGenerateFile, GenerateFileHistory)
}
}
func generateFileHistory() {
func GenerateFileHistory() {
defer logging.Recover()
if 1 > Conf.Editor.GenerateHistoryInterval {