kopia lustrzana https://github.com/OpenDroneMap/NodeODM
Default tasks to running on creation, bump version, fix exit code
rodzic
9bdf410e27
commit
7dca5efaee
|
@ -46,7 +46,7 @@ module.exports = class Task{
|
|||
this.dateCreated = isNaN(parseInt(dateCreated)) ? new Date().getTime() : parseInt(dateCreated);
|
||||
this.dateStarted = 0;
|
||||
this.processingTime = -1;
|
||||
this.setStatus(statusCodes.QUEUED);
|
||||
this.setStatus(statusCodes.RUNNING);
|
||||
this.options = options;
|
||||
this.gcpFiles = [];
|
||||
this.geoFiles = [];
|
||||
|
@ -117,6 +117,8 @@ module.exports = class Task{
|
|||
});
|
||||
}
|
||||
]), err => {
|
||||
if (err) this.setStatus(statusCodes.FAILED, { errorMessage: err.message });
|
||||
else this.setStatus(statusCodes.QUEUED);
|
||||
this.initialized = true;
|
||||
done(err, this);
|
||||
});
|
||||
|
|
|
@ -71,7 +71,9 @@ module.exports = {
|
|||
}
|
||||
|
||||
// Launch
|
||||
let childProcess = spawn(command, params, {cwd: config.odm_path});
|
||||
const env = utils.clone(process.env);
|
||||
env.ODM_NONINTERACTIVE = 1;
|
||||
let childProcess = spawn(command, params, {cwd: config.odm_path, env});
|
||||
|
||||
childProcess
|
||||
.on('exit', (code, signal) => done(null, code, signal))
|
||||
|
|
|
@ -406,8 +406,6 @@ module.exports = {
|
|||
|
||||
task.initialize(err => {
|
||||
if (err) {
|
||||
task.setStatus(statusCodes.FAILED, { errorMessage: err.message });
|
||||
|
||||
// Cleanup
|
||||
removeDirectory(srcPath);
|
||||
removeDirectory(destPath);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "NodeODM",
|
||||
"version": "2.1.4",
|
||||
"version": "2.1.5",
|
||||
"description": "REST API to access ODM",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Ładowanie…
Reference in New Issue