Skip to content

Commit

Permalink
feat: 开始同步前给个文件数总计
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jan 24, 2024
1 parent d968d1d commit a032f97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export class Cluster {
const path = join(this.cacheDir, hashToFilename(file.hash))
return !await fse.pathExists(path)
})
console.log(`mismatch ${missingFiles.length} files, start syncing`)
const totalSize = sum(missingFiles.map((file) => file.size))
const bar = new ProgressBar('downloading [:bar] :current/:total eta:etas :percent :rateBps', {
total: totalSize,
Expand Down

0 comments on commit a032f97

Please sign in to comment.