migrate some values to ssr data tracking so we don't need to rely on BL as much
Some checks failed
Deploy Backend / docker (ubuntu-latest) (push) Successful in 49s
Deploy Website / docker (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Lee
2024-10-26 18:41:51 +01:00
parent 5ff0d11f5a
commit 9626931b91
8 changed files with 196 additions and 68 deletions

View File

@ -61,27 +61,30 @@ connectBeatLeaderWebsocket({
});
export const app = new Elysia();
app.use(
cron({
name: "player-statistics-tracker-cron",
pattern: "1 0 * * *", // Every day at 00:01
timezone: "Europe/London", // UTC time
run: async () => {
await PlayerService.updatePlayerStatistics();
},
})
);
app.use(
cron({
name: "player-scores-tracker-cron",
pattern: "0 4 * * *", // Every day at 04:00
timezone: "Europe/London", // UTC time
protect: true,
run: async () => {
await PlayerService.refreshPlayerScores();
},
})
);
if (isProduction()) {
app.use(
cron({
name: "player-statistics-tracker-cron",
pattern: "1 0 * * *", // Every day at 00:01
timezone: "Europe/London", // UTC time
protect: true,
run: async () => {
await PlayerService.updatePlayerStatistics();
},
})
);
app.use(
cron({
name: "player-scores-tracker-cron",
pattern: "0 4 * * *", // Every day at 04:00
timezone: "Europe/London", // UTC time
protect: true,
run: async () => {
await PlayerService.refreshPlayerScores();
},
})
);
}
/**
* Custom error handler