Skip to content

Commit

Permalink
Fix arguments to setTimeout and add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ooglely authored Apr 3, 2024
1 parent 5cf8e65 commit 2b5bfa0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libs/taskNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,11 @@ module.exports = {
else{
if (++retries < 20){
logger.warn(`Cannot move ${srcPath}, probably caused by antivirus software (please disable it or add an exception), retrying (${retries})...`);
setTimeout(2000, move);
}else cb(err);
setTimeout(move, 2000);
} else {
logger.error(`Unable to move temp images (${srcPath}) after 20 retries. Error: ${err}`);
cb(err);
}
}
});
}
Expand Down

0 comments on commit 2b5bfa0

Please sign in to comment.