kopia lustrzana https://github.com/OpenDroneMap/NodeODM
commit
bb8b7bda5c
|
@ -158,7 +158,8 @@ class TaskManager{
|
|||
try{
|
||||
tasks = JSON.parse(data.toString());
|
||||
}catch(e){
|
||||
done(new Error(`Could not load task list. It looks like the ${TASKS_DUMP_FILE} is corrupted (${e.message}). Please manually delete the file and try again.`));
|
||||
logger.warn(`Could not load task list. It looks like the ${TASKS_DUMP_FILE} is corrupted (${e.message}).`);
|
||||
if (done !== undefined) done();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -290,8 +290,26 @@ module.exports = {
|
|||
// Move all uploads to data/<uuid>/images dir (if any)
|
||||
cb => fs.mkdir(destPath, undefined, cb),
|
||||
cb => fs.mkdir(destGcpPath, undefined, cb),
|
||||
cb => mv(srcPath, destImagesPath, cb),
|
||||
|
||||
cb => {
|
||||
// We attempt to do this multiple times,
|
||||
// as antivirus software sometimes is scanning
|
||||
// the folder while we try to move it, resulting in
|
||||
// an operation not permitted error
|
||||
let retries = 0;
|
||||
|
||||
const move = () => {
|
||||
mv(srcPath, destImagesPath, err => {
|
||||
if (!err) cb(); // Done
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
move();
|
||||
},
|
||||
// Zip files handling
|
||||
cb => {
|
||||
const handleSeed = (cb) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "NodeODM",
|
||||
"version": "2.1.8",
|
||||
"version": "2.1.9",
|
||||
"description": "REST API to access ODM",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Ładowanie…
Reference in New Issue