-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
27 lines (21 loc) · 862 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { connectDB } from "./config/db";
import { config } from "./config/config";
import { checkLiveEventsCron } from "./cronJobs/checkLiveGames";
import { checkDailyEvents } from "./services/getDailyEvents";
import { storeCacheValues } from "./config/cacheValues";
import { checkDailyEventsCron } from "./cronJobs/checkDailyEvents";
import { checkWeeklyEventsCron } from "./cronJobs/checkWeeklyEvents";
import { checkWeeklyEvents } from "./services/getWeeklyEvents";
import { deleteOldMatches } from "./utils/deleteOldMatches";
import { updateMatchesInCacheCron } from "./cronJobs/updateMatchesInCache";
let db: any;
(async () => {
db = connectDB().then();
})();
checkDailyEvents();
checkWeeklyEvents();
checkWeeklyEventsCron.start();
checkDailyEventsCron.start();
checkLiveEventsCron.start();
updateMatchesInCacheCron.start()
deleteOldMatches().then()