Skip to content

Commit de33311

Browse files
committed
fix: monitor timeout bug
1 parent 4b4742d commit de33311

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/_shims/handler.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ exports.handler = async (event, context) => {
2828
context.callbackWaitsForEmptyEventLoop =
2929
app.callbackWaitsForEmptyEventLoop === true ? true : false
3030

31+
// provide sls intialize hooks
32+
if (app.slsInitialize && typeof app.slsInitialize === 'function') {
33+
await app.slsInitialize()
34+
}
35+
3136
const result = await proxy(server, event, context, 'PROMISE')
3237
return result.promise
3338
}

src/_shims/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"author": "Serverless, Inc.",
1212
"license": "Apache",
1313
"dependencies": {
14-
"tencent-component-monitor": "^1.0.5",
14+
"tencent-component-monitor": "^1.0.6",
1515
"tencent-serverless-http": "^1.2.0"
1616
}
1717
}

0 commit comments

Comments
 (0)