3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Lower message retention period to 1 day

This commit is contained in:
Dragory 2020-05-28 01:54:38 +03:00
parent 64d633c820
commit e4aa101edd
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -4,10 +4,15 @@ import { ISavedMessageData, SavedMessage } from "./entities/SavedMessage";
import { QueuedEventEmitter } from "../QueuedEventEmitter";
import { GuildChannel, Message } from "eris";
import moment from "moment-timezone";
import { DAYS, MINUTES } from "../utils";
const CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 min
const CLEANUP_INTERVAL = 5 * MINUTES;
const RETENTION_PERIOD = 5 * 24 * 60 * 60 * 1000; // 5 days
/**
* How long message edits, deletions, etc. will include the original message content.
* This is very heavy storage-wise, so keeping it as low as possible is ideal.
*/
const RETENTION_PERIOD = 1 * DAYS;
async function cleanup() {
const repository = getRepository(SavedMessage);