v1.3.2-beta/scheduledCleanUp fix

This commit is contained in:
Ayushya Amitabh
2020-06-04 22:12:51 -04:00
parent 7fb38e2b9e
commit be3c74d37d
+2 -1
View File
@@ -1,4 +1,5 @@
const admin = require('firebase-admin');
const cleanUpRoom = require('./cleanUpRoom');
const timeDiff = (ds1, ds2) => {
const d1 = new Date(ds1);
@@ -29,7 +30,7 @@ module.exports = async () => {
timeDiff(roomSnap.createTime.toDate(), startedTime) >= 24 ||
timeDiff(roomSnap.updateTime.toDate(), startedTime) >= 12
)
await FunctionModules2.cleanUpRoom(roomSnap.id);
await cleanUpRoom(roomSnap.id);
console.info(`Deleted room ${roomSnap.id} from auto cleanup`);
return;
})