kopia lustrzana https://github.com/OpenDroneMap/NodeODM
dateCreated hot init extension
rodzic
434b84bf7c
commit
3909c0a677
|
@ -8,7 +8,7 @@ REST API to access ODM
|
|||
|
||||
=== Version information
|
||||
[%hardbreaks]
|
||||
_Version_ : 1.5.1
|
||||
_Version_ : 1.5.2
|
||||
|
||||
|
||||
=== Contact information
|
||||
|
@ -295,6 +295,8 @@ Creates a new task and places it at the end of the processing queue. For uploadi
|
|||
_optional_|An optional UUID string that will be used as UUID for this task instead of generating a random one.|string|
|
||||
|*Query*|*token* +
|
||||
_optional_|Token required for authentication (when authentication is required).|string|
|
||||
|*FormData*|*dateCreated* +
|
||||
_optional_|An optional timestamp overriding the default creation date of the task.|integer|
|
||||
|*FormData*|*images* +
|
||||
_optional_|Images to process, plus an optional GCP file (*.txt) and/or an optional seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
|
||||
|*FormData*|*name* +
|
||||
|
@ -402,6 +404,8 @@ Initialize the upload of a new task. If successful, a user can start uploading f
|
|||
_optional_|An optional UUID string that will be used as UUID for this task instead of generating a random one.|string|
|
||||
|*Query*|*token* +
|
||||
_optional_|Token required for authentication (when authentication is required).|string|
|
||||
|*FormData*|*dateCreated* +
|
||||
_optional_|An optional timestamp overriding the default creation date of the task.|integer|
|
||||
|*FormData*|*name* +
|
||||
_optional_|An optional name to be associated with the task|string|
|
||||
|*FormData*|*options* +
|
||||
|
|
File diff suppressed because one or more lines are too long
12
index.js
12
index.js
|
@ -87,6 +87,12 @@ let server;
|
|||
* required: false
|
||||
* type: string
|
||||
* -
|
||||
* name: dateCreated
|
||||
* in: formData
|
||||
* description: 'An optional timestamp overriding the default creation date of the task.'
|
||||
* required: false
|
||||
* type: integer
|
||||
* -
|
||||
* name: token
|
||||
* in: query
|
||||
* description: 'Token required for authentication (when authentication is required).'
|
||||
|
@ -239,6 +245,12 @@ app.post('/task/new/commit/:uuid', authCheck, taskNew.getUUID, taskNew.handleCom
|
|||
* required: false
|
||||
* type: string
|
||||
* -
|
||||
* name: dateCreated
|
||||
* in: formData
|
||||
* description: 'An optional timestamp overriding the default creation date of the task.'
|
||||
* required: false
|
||||
* type: integer
|
||||
* -
|
||||
* name: token
|
||||
* in: query
|
||||
* description: 'Token required for authentication (when authentication is required).'
|
||||
|
|
|
@ -38,13 +38,13 @@ const utils = require('./utils');
|
|||
const statusCodes = require('./statusCodes');
|
||||
|
||||
module.exports = class Task{
|
||||
constructor(uuid, name, options = [], webhook = null, skipPostProcessing = false, outputs = [], done = () => {}){
|
||||
constructor(uuid, name, options = [], webhook = null, skipPostProcessing = false, outputs = [], dateCreated = new Date().getTime(), done = () => {}){
|
||||
assert(uuid !== undefined, "uuid must be set");
|
||||
assert(done !== undefined, "ready must be set");
|
||||
|
||||
this.uuid = uuid;
|
||||
this.name = name !== "" ? name : "Task of " + (new Date()).toISOString();
|
||||
this.dateCreated = new Date().getTime();
|
||||
this.dateCreated = isNaN(parseInt(dateCreated)) ? new Date().getTime() : parseInt(dateCreated);
|
||||
this.processingTime = -1;
|
||||
this.setStatus(statusCodes.QUEUED);
|
||||
this.options = options;
|
||||
|
@ -96,6 +96,7 @@ module.exports = class Task{
|
|||
taskJson.webhook,
|
||||
taskJson.skipPostProcessing,
|
||||
taskJson.outputs,
|
||||
taskJson.dateCreated,
|
||||
(err, task) => {
|
||||
if (err) done(err);
|
||||
else{
|
||||
|
|
|
@ -353,6 +353,7 @@ module.exports = {
|
|||
req.body.webhook,
|
||||
req.body.skipPostProcessing === 'true',
|
||||
req.body.outputs,
|
||||
req.body.dateCreated,
|
||||
(err, task) => {
|
||||
if (err) cb(err);
|
||||
else {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "node-opendronemap",
|
||||
"version": "1.5.1",
|
||||
"name": "NodeODM",
|
||||
"version": "1.5.2",
|
||||
"description": "REST API to access ODM",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Ładowanie…
Reference in New Issue