Token handling, better S3 test uploads

pull/51/head
Piero Toffanin 2018-11-27 16:51:47 -05:00
rodzic dfc776eaf7
commit c9d82e13bd
2 zmienionych plików z 11 dodań i 7 usunięć

Wyświetl plik

@ -218,10 +218,6 @@ module.exports = class Task{
this.stopTrackingProcessingTime();
done(err);
};
const sourcePath = !config.test ?
this.getProjectFolderPath() :
path.join("tests", "processing_results");
const postProcess = () => {
const createZipArchive = (outputFilename, files) => {
@ -242,7 +238,11 @@ module.exports = class Task{
});
archive.pipe(output);
let globs = [];
let globs = [];
const sourcePath = !config.test ?
this.getProjectFolderPath() :
path.join("tests", "processing_results");
// Process files and directories first
files.forEach(file => {
@ -342,7 +342,11 @@ module.exports = class Task{
// Upload to S3 all paths + all.zip file (if config says so)
if (S3.enabled()){
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 => {
if (!err) this.output.push("Done uploading to S3!");
done(err);

Wyświetl plik

@ -211,7 +211,7 @@ $(function() {
};
Task.prototype.remove = function() {
var self = this;
var url = "/task/remove";
var url = "/task/remove?token=" + token;
function doRemove() {
$.post(url, {