chore: code cleanup

This commit is contained in:
Anoop M D 2024-08-19 11:59:43 +05:30
parent bd3388d226
commit d4beb7ddda
2 changed files with 4 additions and 2 deletions

View File

@ -100,6 +100,10 @@ class Bru {
setNextRequest(nextRequest) {
this.nextRequest = nextRequest;
}
sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
}
module.exports = Bru;

View File

@ -93,14 +93,12 @@ const executeQuickJsVmAsync = async ({ script: externalScript, context: external
fn.apply();
}
await sleep(0);
console?.debug?.('quick-js:execution-start:');
try {
${externalScript}
}
catch(error) {
console?.debug?.('quick-js:execution-end:with-error', error?.message);
}
console?.debug?.('quick-js:execution-end:');
return 'done';
})()
`;