From 5e3e3d83154f1ebf35a0e93e5570dfda135ac964 Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Mon, 1 Aug 2022 21:03:01 -0400 Subject: [PATCH] refactor: replace arrow functions --- .../in-process-runner/InProcessRunner.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lambda/handler-runner/in-process-runner/InProcessRunner.js b/src/lambda/handler-runner/in-process-runner/InProcessRunner.js index 8fd95fcf0..475f10855 100644 --- a/src/lambda/handler-runner/in-process-runner/InProcessRunner.js +++ b/src/lambda/handler-runner/in-process-runner/InProcessRunner.js @@ -86,15 +86,21 @@ export default class InProcessRunner { // create new immutable object const lambdaContext = { ...context, - done: (err, data) => callback(err, data), - fail: (err) => callback(err), + done(err, data) { + callback(err, data) + }, + fail(err) { + callback(err) + }, getRemainingTimeInMillis() { const timeLeft = executionTimeout - performance.now() // just return 0 for now if we are beyond alotted time (timeout) return timeLeft > 0 ? floor(timeLeft) : 0 }, - succeed: (res) => callback(null, res), + succeed(res) { + callback(null, res) + }, } let result