My app uses a Firebase function that is triggered when my Firebase realtime database is modified.
The function initiates a setInterval function that is supposed to loop for an hour then terminate....HOWEVER it seems to quit after 15mins.
Im guessing this is a restriction put in place by Firebase...does anyone know how I can get around this?
See code below
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
//this gets triggered when db is updated
exports.onActiveUpdate = functions.database
.ref('/pathToRealtimeDb').onUpdate(() => {
let counter = setInterval(() => {
//count down from 60 mins to zero then exit
}, 60000); //end setInterval
});