mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
fix
This commit is contained in:
parent
f04ecab3ad
commit
dd4014d48e
2 changed files with 5 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ import { RepoPermissionSyncer } from './ee/repoPermissionSyncer.js';
|
||||||
import { AccountPermissionSyncer } from "./ee/accountPermissionSyncer.js";
|
import { AccountPermissionSyncer } from "./ee/accountPermissionSyncer.js";
|
||||||
import { PromClient } from './promClient.js';
|
import { PromClient } from './promClient.js';
|
||||||
import { RepoIndexManager } from "./repoIndexManager.js";
|
import { RepoIndexManager } from "./repoIndexManager.js";
|
||||||
|
import { shutdownPosthog } from "./posthog.js";
|
||||||
|
|
||||||
|
|
||||||
const logger = createLogger('backend-entrypoint');
|
const logger = createLogger('backend-entrypoint');
|
||||||
|
|
@ -101,6 +102,7 @@ const cleanup = async (signal: string) => {
|
||||||
|
|
||||||
await prisma.$disconnect();
|
await prisma.$disconnect();
|
||||||
await redis.quit();
|
await redis.quit();
|
||||||
|
await shutdownPosthog();
|
||||||
}
|
}
|
||||||
|
|
||||||
process.on('SIGINT', () => cleanup('SIGINT').finally(() => process.exit(0)));
|
process.on('SIGINT', () => cleanup('SIGINT').finally(() => process.exit(0)));
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,6 @@ export function captureEvent<E extends PosthogEvent>(event: E, properties: Posth
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function shutdownPosthog() {
|
||||||
await posthog?.shutdown();
|
await posthog?.shutdown();
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue