Skip to content

Commit

Permalink
feat: 允许强制从center server同步
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jan 23, 2024
1 parent cd0e0d6 commit a613844
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ export class Cluster {
console.log(`${colors.green('downloading')} ${colors.underline(file.path)}`)
}
let lastProgress = 0
const res = await this.got.get<Buffer>(file.path.substring(1))
const res = await this.got.get<Buffer>(file.path.substring(1), {
searchParams: {
noopen: process.env.FORCE_NOOPEN === 'true' ? 1 : '',
},
})
.on('downloadProgress', (progress) => {
bar.tick(progress.transferred - lastProgress)
lastProgress = progress.transferred
Expand Down

0 comments on commit a613844

Please sign in to comment.