mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-06 05:26:54 +08:00
refactor
This commit is contained in:
parent
888cf9f34e
commit
b177232710
1 changed files with 13 additions and 11 deletions
|
@ -4,17 +4,19 @@ import * as Prometheus from "../utils/prometheus";
|
|||
|
||||
const CRON_SCHEDULE = "0 0 * * * *";
|
||||
|
||||
function main(): void {
|
||||
Promise.all([
|
||||
set("ape-keys"),
|
||||
set("configs"),
|
||||
set("errors"),
|
||||
set("logs"),
|
||||
set("presets"),
|
||||
set("reports"),
|
||||
set("results"),
|
||||
set("users"),
|
||||
]);
|
||||
const collectionsToLog = [
|
||||
"ape-keys",
|
||||
"configs",
|
||||
"errors",
|
||||
"logs",
|
||||
"presets",
|
||||
"reports",
|
||||
"results",
|
||||
"users",
|
||||
];
|
||||
|
||||
async function main(): Promise<void> {
|
||||
await Promise.all(collectionsToLog.map(set));
|
||||
}
|
||||
|
||||
async function set(collection: string): Promise<void> {
|
||||
|
|
Loading…
Add table
Reference in a new issue