Skip to content

Commit

Permalink
refactor: replace arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Aug 2, 2022
1 parent be2415a commit 5e3e3d8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/lambda/handler-runner/in-process-runner/InProcessRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e3e3d8

Please sign in to comment.