Skip to content

Commit

Permalink
changed the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Dec 12, 2024
1 parent 0602080 commit 08fbdcc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions packages/nexrender-action-decompress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ const decompress = (job, settings, asset, action) => {
// Default behavior - extract all files
zip.extractAllTo(job.workpath, action.overwrite || false);
}

if (asset.decompressed) {
asset.src = asset.dest;
asset.dest = path.join(job.workpath, asset.decompressed);
}

break;

case 'zip-7z':
Expand All @@ -52,17 +58,17 @@ const decompress = (job, settings, asset, action) => {
myStream.on('error', (err) => reject(err))
});

if (asset.decompressed) {
asset.src = asset.dest;
asset.dest = path.join(job.workpath, asset.decompressed);
}

return promise;

default:
return Promise.resolve();
}

if (asset.decompressed) {
asset.src = asset.dest;
asset.dest = path.join(job.workpath, asset.decompressed);
}

return Promise.resolve();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/nexrender-worker/src/instance.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { createClient } = require('@nexrender/api')
const { init, render } = require('@nexrender/core')
const { getRenderingStatus } = require('@nexrender/types/job')
const pkg = require('../package.json')
const { withTimeout } = require('@nexrender/core/src/helpers/timeout');
const pkg = require('../package.json')

const NEXRENDER_API_POLLING = process.env.NEXRENDER_API_POLLING || 30 * 1000;
const NEXRENDER_TOLERATE_EMPTY_QUEUES = process.env.NEXRENDER_TOLERATE_EMPTY_QUEUES;
Expand Down

0 comments on commit 08fbdcc

Please sign in to comment.