Skip to content

Commit

Permalink
chore: add configurable ivm execution timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayachand committed Sep 13, 2024
1 parent 19ba875 commit 9846158
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/customTransformer-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const logger = require('../logger');
const stats = require('./stats');

const userTransformTimeout = parseInt(process.env.USER_TRANSFORM_TIMEOUT || '600000', 10);
const ivmExecutionTimeout = parseInt(process.env.IVM_EXECUTION_TIMEOUT || '4000', 10);

async function transform(isolatevm, events) {
const transformationPayload = {};
Expand All @@ -24,7 +25,7 @@ async function transform(isolatevm, events) {
new ivm.Reference(reject),
sharedTransformationPayload,
],
{ timeout: 4000 },
{ timeout: ivmExecutionTimeout },
);
} catch (error) {
reject(error.message);
Expand Down

0 comments on commit 9846158

Please sign in to comment.