MCPcopy Index your code
hub / github.com/wei/pull / main

Function main

scripts/full-sync.ts:9–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { appConfig } from "@/src/configs/app-config.ts";
8
9async function main() {
10 let exitCode = 0;
11 let redisClient: ReturnType<typeof getRedisClient> | undefined;
12
13 try {
14 await connectMongoDB();
15 redisClient = getRedisClient(`${appConfig.appSlug}-full-sync`);
16
17 const probot = createProbot({ overrides: { log: logger } });
18 await fullSync(probot, {
19 redisClient,
20 getRepositorySchedule,
21 });
22 } catch (error) {
23 logger.error(error, "Error during full sync");
24 exitCode = 1;
25 } finally {
26 await disconnectMongoDB();
27 if (redisClient) {
28 try {
29 await redisClient.quit();
30 } catch {
31 // ignore
32 }
33 }
34 Deno.exit(exitCode);
35 }
36}
37
38if (import.meta.main) {
39 await main();

Callers 1

full-sync.tsFile · 0.70

Calls 3

connectMongoDBFunction · 0.90
getRedisClientFunction · 0.90
disconnectMongoDBFunction · 0.90

Tested by

no test coverage detected