kopia lustrzana https://github.com/OpenDroneMap/NodeODM
Token handling, better S3 test uploads
rodzic
dfc776eaf7
commit
c9d82e13bd
16
libs/Task.js
16
libs/Task.js
|
@ -218,10 +218,6 @@ module.exports = class Task{
|
||||||
this.stopTrackingProcessingTime();
|
this.stopTrackingProcessingTime();
|
||||||
done(err);
|
done(err);
|
||||||
};
|
};
|
||||||
|
|
||||||
const sourcePath = !config.test ?
|
|
||||||
this.getProjectFolderPath() :
|
|
||||||
path.join("tests", "processing_results");
|
|
||||||
|
|
||||||
const postProcess = () => {
|
const postProcess = () => {
|
||||||
const createZipArchive = (outputFilename, files) => {
|
const createZipArchive = (outputFilename, files) => {
|
||||||
|
@ -242,7 +238,11 @@ module.exports = class Task{
|
||||||
});
|
});
|
||||||
|
|
||||||
archive.pipe(output);
|
archive.pipe(output);
|
||||||
let globs = [];
|
let globs = [];
|
||||||
|
|
||||||
|
const sourcePath = !config.test ?
|
||||||
|
this.getProjectFolderPath() :
|
||||||
|
path.join("tests", "processing_results");
|
||||||
|
|
||||||
// Process files and directories first
|
// Process files and directories first
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
|
@ -342,7 +342,11 @@ module.exports = class Task{
|
||||||
// Upload to S3 all paths + all.zip file (if config says so)
|
// Upload to S3 all paths + all.zip file (if config says so)
|
||||||
if (S3.enabled()){
|
if (S3.enabled()){
|
||||||
tasks.push((done) => {
|
tasks.push((done) => {
|
||||||
S3.uploadPaths(sourcePath, config.s3Bucket, this.uuid, ['all.zip'].concat(allPaths),
|
const s3Paths = !config.test ?
|
||||||
|
['all.zip'].concat(allPaths) :
|
||||||
|
['all.zip']; // During testing only upload all.zip
|
||||||
|
|
||||||
|
S3.uploadPaths(this.getProjectFolderPath(), config.s3Bucket, this.uuid, s3Paths,
|
||||||
err => {
|
err => {
|
||||||
if (!err) this.output.push("Done uploading to S3!");
|
if (!err) this.output.push("Done uploading to S3!");
|
||||||
done(err);
|
done(err);
|
||||||
|
|
|
@ -211,7 +211,7 @@ $(function() {
|
||||||
};
|
};
|
||||||
Task.prototype.remove = function() {
|
Task.prototype.remove = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var url = "/task/remove";
|
var url = "/task/remove?token=" + token;
|
||||||
|
|
||||||
function doRemove() {
|
function doRemove() {
|
||||||
$.post(url, {
|
$.post(url, {
|
||||||
|
|
Ładowanie…
Reference in New Issue