由于没有任何效果,我从函数中删除了所有内容,并且仍被调用两次,
exports.contentServer = functions.https.onRequest((request, response) => {
// return response.status(200).send("ok"); // this
response.status(200).end(); //but also this
});
在两种情况下都有效,并且我在10ms内得到响应,但是在控制台的日志中:
3:04:07.918 PM Function execution started
3:04:07.932 PM Function execution took 15 ms, finished with status code: 200
3:04:08.354 PM Function execution started
3:04:08.371 PM Function execution took 18 ms, finished with status code: 200
即使它只是以某种方式结束,甚至甚至重定向到页面,它也会发生两次。