Skip to content

Commit

Permalink
fix: cleanTempDirectory not remake trash directory (#1824)
Browse files Browse the repository at this point in the history
  • Loading branch information
tusik committed Jun 21, 2024
1 parent 5e2c607 commit 4877459
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/core/src/processors/helper/helper.cron.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { CronExpression } from '@nestjs/schedule'
import { CronDescription } from '~/common/decorators/cron-description.decorator'
import { CronOnce } from '~/common/decorators/cron-once.decorator'
import { RedisKeys } from '~/constants/cache.constant'
import { LOG_DIR, TEMP_DIR } from '~/constants/path.constant'
import { LOG_DIR, TEMP_DIR, STATIC_FILE_TRASH_DIR } from '~/constants/path.constant'
import { AggregateService } from '~/modules/aggregate/aggregate.service'
import { AnalyzeModel } from '~/modules/analyze/analyze.model'
import { ConfigsService } from '~/modules/configs/configs.service'
Expand Down Expand Up @@ -89,7 +89,7 @@ export class CronService {
@CronDescription('清理临时文件')
async cleanTempDirectory() {
await rm(TEMP_DIR, { recursive: true })
mkdirp.sync(TEMP_DIR)
mkdirp.sync(STATIC_FILE_TRASH_DIR)
this.logger.log('--> 清理临时文件成功')
}
// “At 00:05.”
Expand Down

0 comments on commit 4877459

Please sign in to comment.