time sync
This commit is contained in:
+2
-3
@@ -461,10 +461,9 @@ exports.scheduledCleanUp = functions.pubsub.schedule('every 60 minutes').onRun(a
|
||||
roomRef
|
||||
.get()
|
||||
.then(async (roomSnap) => {
|
||||
const roomData = roomSnap.data();
|
||||
if (
|
||||
timeDiff(roomData.createdAt, startedTime) >= 24 ||
|
||||
timeDiff(roomData.updatedAt, startedTime) >= 12
|
||||
timeDiff(roomSnap.createTime.toDate(), startedTime) >= 24 ||
|
||||
timeDiff(roomSnap.updateTime.toDate(), startedTime) >= 12
|
||||
)
|
||||
await cleanUpRoom(roomSnap.id);
|
||||
console.info(`Deleted room ${roomSnap.id} from auto cleanup`);
|
||||
|
||||
Reference in New Issue
Block a user