mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
fix doc images (#1083)
* perf: clear tmp files * fix doc images * update docker-compose
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { setCron } from '@fastgpt/service/common/system/cron';
|
||||
import { startTrainingQueue } from '@/service/core/dataset/training/utils';
|
||||
import { clearTmpUploadFiles } from '@fastgpt/service/common/file/utils';
|
||||
|
||||
export const startCron = () => {
|
||||
setTrainingQueueCron();
|
||||
setClearTmpUploadFilesCron();
|
||||
};
|
||||
|
||||
export const setTrainingQueueCron = () => {
|
||||
@@ -10,3 +12,11 @@ export const setTrainingQueueCron = () => {
|
||||
startTrainingQueue();
|
||||
});
|
||||
};
|
||||
|
||||
export const setClearTmpUploadFilesCron = () => {
|
||||
clearTmpUploadFiles();
|
||||
// Clear tmp upload files every ten minutes
|
||||
setCron('*/10 * * * *', () => {
|
||||
clearTmpUploadFiles();
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user