如何在计划的Firebase函数中调用https firebase函数以使其保持温暖并避免冷启动

时间:2019-06-28 13:41:44

标签: firebase google-cloud-platform google-cloud-functions

避免firebase函数冷启动的一种方法是始终保持其温暖,例如每1分钟调用一次函数。

最近在Firebase中添加了以下预定功能

export scheduledFunction = functions.pubsub.schedule('every 5 minutes').onRun((context) => {
  console.log('This will be run every 5 minutes!');
  // call another function on same project
});

我的问题是如何在同一项目中调用另一个https firebase函数以使该函数保持温暖? (确保无需对域名进行硬编码)

0 个答案:

没有答案