slow down cache saving for prod
This commit is contained in:
parent
0f55aca5b1
commit
cee1f487d5
@ -56,7 +56,12 @@ class ModmailClient extends Client {
|
||||
this.logger.info(`Starting up modmail handler`);
|
||||
this.modmail.init();
|
||||
|
||||
process.on('exit', this.saveCache.bind(this));
|
||||
process.on('exit', () => {
|
||||
this.saveCache();
|
||||
this.modmail.saveHistory();
|
||||
// eslint-disable-next-line no-process-exit
|
||||
process.exit();
|
||||
});
|
||||
process.on('SIGINT', () => {
|
||||
this.saveCache.bind(this);
|
||||
this.modmail.saveHistory();
|
||||
@ -66,7 +71,7 @@ class ModmailClient extends Client {
|
||||
|
||||
this._ready = true;
|
||||
|
||||
this.cacheSaver = setInterval(this.saveCache.bind(this), 1 * 60 * 1000);
|
||||
this.cacheSaver = setInterval(this.saveCache.bind(this), 10 * 60 * 1000);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user