Skip to content

Commit

Permalink
Merge pull request #77 from Yee36951/async-gc-enable
Browse files Browse the repository at this point in the history
feat: 同时执行gc与启用
  • Loading branch information
bangbang93 committed Jun 13, 2024
2 parents 462029d + 407dda5 commit 4b9f21a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export async function bootstrap(version: string): Promise<void> {
}
throw e
}
logger.info('回收文件')
cluster.storage.gc(files.files).catch((e: unknown) => {
logger.error({err: e}, 'gc error')
})

cluster.connect()
const proto = config.byoc ? 'http' : 'https'
Expand Down Expand Up @@ -78,13 +82,6 @@ export async function bootstrap(version: string): Promise<void> {
}
}

try {
logger.info('回收文件')
await cluster.storage.gc(files.files)
} catch (e) {
logger.error({err: e}, 'gc error')
}

async function checkFile(lastFileList: IFileList): Promise<void> {
logger.debug('refresh files')
try {
Expand Down

0 comments on commit 4b9f21a

Please sign in to comment.