EMERG: Clean up score import jobs after they are ran.

WHY IS THIS NOT THE DEFAULT???

We've been shredding our servers disk and generally getting into
trouble by having redis infinitely balloon up score imports
and then writing them to disk for backup.
we were writing upwards of 200Mbit/s.

Goddamnit bull.
This commit is contained in:
zkldi
2022-07-24 16:14:46 +01:00
parent 80b36feec1
commit 72918c8d6a
@@ -3,6 +3,10 @@ import { Environment, TachiConfig } from "lib/setup/config";
const ScoreImportQueue = new Queue(`${TachiConfig.NAME} Score Import Queue`, {
connection: { host: Environment.redisUrl, port: 6379 },
defaultJobOptions: {
removeOnComplete: true,
removeOnFail: 10, // keep the last 10 failed jobs, but start pruning beyond that.
}
});
export default ScoreImportQueue;