v1.3.2-beta/scheduledCleanUp fix
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
const admin = require('firebase-admin');
|
const admin = require('firebase-admin');
|
||||||
|
const cleanUpRoom = require('./cleanUpRoom');
|
||||||
|
|
||||||
const timeDiff = (ds1, ds2) => {
|
const timeDiff = (ds1, ds2) => {
|
||||||
const d1 = new Date(ds1);
|
const d1 = new Date(ds1);
|
||||||
@@ -29,7 +30,7 @@ module.exports = async () => {
|
|||||||
timeDiff(roomSnap.createTime.toDate(), startedTime) >= 24 ||
|
timeDiff(roomSnap.createTime.toDate(), startedTime) >= 24 ||
|
||||||
timeDiff(roomSnap.updateTime.toDate(), startedTime) >= 12
|
timeDiff(roomSnap.updateTime.toDate(), startedTime) >= 12
|
||||||
)
|
)
|
||||||
await FunctionModules2.cleanUpRoom(roomSnap.id);
|
await cleanUpRoom(roomSnap.id);
|
||||||
console.info(`Deleted room ${roomSnap.id} from auto cleanup`);
|
console.info(`Deleted room ${roomSnap.id} from auto cleanup`);
|
||||||
return;
|
return;
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user