From 08fbdcc806d6c1da6e8fe727791be8ee404de866 Mon Sep 17 00:00:00 2001 From: Vladyslav Hrytsenko Date: Thu, 12 Dec 2024 21:28:54 +0200 Subject: [PATCH] changed the logic --- packages/nexrender-action-decompress/index.js | 16 +++++++++++----- packages/nexrender-worker/src/instance.js | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/nexrender-action-decompress/index.js b/packages/nexrender-action-decompress/index.js index a15de98a..b06b7a01 100644 --- a/packages/nexrender-action-decompress/index.js +++ b/packages/nexrender-action-decompress/index.js @@ -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': @@ -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(); } diff --git a/packages/nexrender-worker/src/instance.js b/packages/nexrender-worker/src/instance.js index c441ada6..b7afdfd1 100644 --- a/packages/nexrender-worker/src/instance.js +++ b/packages/nexrender-worker/src/instance.js @@ -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;