Joh*_*rtl 1 javascript node.js firebase google-cloud-platform google-cloud-functions
文档提到了 using ,但是如何将此选项与预定函数一起使用,如下所示:.runWith({memory: "1GB"})
functions.pubsub.schedule('every 10 minutes').onRun(async (context) => {
console.log("Do something");
});
Run Code Online (Sandbox Code Playgroud)
只需执行以下操作:
functions.runWith({memory: "1GB"}).pubsub.schedule('every 10 minutes').onRun(async (context) => {
console.log("Do something");
// Don't forget to return a Promise if necessary!!
// See https://firebase.google.com/docs/functions/terminate-functions
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
504 次 |
| 最近记录: |