MCPcopy Create free account
hub / github.com/alibaba/page-agent / printProgress

Function printProgress

scripts/parallel-task.js:30–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 let tick = 0
29
30 const printProgress = () => {
31 const running = total - done - failed
32 const s = spinner[tick++ % spinner.length]
33 const status = failed
34 ? `${running} running, ${done} done, ${chalk.bgRed.white.bold(` ${failed} failed `)}`
35 : `${running} running, ${done} done`
36 process.stderr.write(`\r${chalk.bgCyan.black.bold(` ${s} ${done}/${total} `)} ${status} `)
37 }
38
39 const timer = setInterval(printProgress, 1000)
40 printProgress()

Callers 1

parallelTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected