cdp: make progress logging same as node
This commit is contained in:
parent
9b16a5ca93
commit
2dfb0cfe5a
@ -45,8 +45,7 @@ export default async ({ pipe: { pipeWrite, pipeRead } = {}, port }) => {
|
|||||||
const continualTrying = func => new Promise(resolve => {
|
const continualTrying = func => new Promise(resolve => {
|
||||||
const attempt = async () => {
|
const attempt = async () => {
|
||||||
try {
|
try {
|
||||||
console.log('a');
|
Deno.stdout.write(new TextEncoder().encode('.'));
|
||||||
// process.stdout.write('.');
|
|
||||||
resolve(await func());
|
resolve(await func());
|
||||||
} catch (e) { // fail, wait 100ms and try again
|
} catch (e) { // fail, wait 100ms and try again
|
||||||
await new Promise(res => setTimeout(res, 200));
|
await new Promise(res => setTimeout(res, 200));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user