using template: template.yml
HttpTrigger httpTrigger of Puppeteer-service-screenshot/Puppeteer-screenshot was registered
url: http://localhost:8000/2016-08-15/proxy/Puppeteer-service-screenshot/Puppeteer-screenshot/
methods: [ 'GET', 'POST', 'PUT' ]
authType: ANONYMOUS
function compute app listening on port 8000!
skip pulling image aliyunfc/runtime-nodejs12:1.9.13...
FC Initialize End RequestId: 6e845f13-b0b7-4872-9195-abdb4673c6e8, Error: Handled function error
FC Invoke Start RequestId: 6e845f13-b0b7-4872-9195-abdb4673c6e8
load code for handler:demo.handler
2021-03-15T05:37:48.650Z 6e845f13-b0b7-4872-9195-abdb4673c6e8 [verbose] ======> demo.js handler()
FC Invoke End RequestId: 6e845f13-b0b7-4872-9195-abdb4673c6e8
Error: Missing header x-fc-initialization-timeout
RequestId: 6e845f13-b0b7-4872-9195-abdb4673c6e8 Billed Duration: 279 ms Memory Size: 3938 MB Max Memory Used: 17 MB
fun deploy后函数计算控制台日志:
FC Initialize Start RequestId: c02d7abe-a85c-47d0-9b3c-939d4747bf97
load code for handler:demo.initializer
2021-03-15T05:40:01.316Z c02d7abe-a85c-47d0-9b3c-939d4747bf97 [verbose] ======> demo.js initializer()
FC Initialize End RequestId: c02d7abe-a85c-47d0-9b3c-939d4747bf97
FC Invoke Start RequestId: c02d7abe-a85c-47d0-9b3c-939d4747bf97
load code for handler:demo.handler
2021-03-15T05:40:01.463Z c02d7abe-a85c-47d0-9b3c-939d4747bf97 [verbose] ======> demo.js handler()
FC Invoke End RequestId: c02d7abe-a85c-47d0-9b3c-939d4747bf97
配置的Initializer函数在本地运行时无法触发,发布到线上后可以触发
配置和日志如下:
template.yml
demo.js
fun local start
日志:fun deploy
后函数计算控制台
日志: