Process timeout | Amazon Lambda to Firebase

前端 未结 4 670
粉色の甜心
粉色の甜心 2021-01-19 11:46

i\'ve written code in node.js and my data is on Firebase. The problem i\'m facing is that my code never exits. I\'ve done it like this one Link

The problem is that f

4条回答
  •  悲哀的现实
    2021-01-19 12:27

    Add this line at the beginning of your handler function and then you should be able to use the callback without issue:

    function handler (event, context, callback) {
      context.callbackWaitsForEmptyEventLoop = false // Add this line
    }
    

提交回复
热议问题