@@ -2,12 +2,12 @@ import "./instrument.js";
22
33import { PrismaClient } from "@sourcebot/db" ;
44import { createLogger } from "@sourcebot/logger" ;
5- import { hasEntitlement , loadConfig } from '@sourcebot/shared' ;
5+ import { getConfigSettings , hasEntitlement } from '@sourcebot/shared' ;
66import { existsSync } from 'fs' ;
77import { mkdir } from 'fs/promises' ;
88import { Redis } from 'ioredis' ;
99import { ConnectionManager } from './connectionManager.js' ;
10- import { DEFAULT_SETTINGS , INDEX_CACHE_DIR , REPOS_CACHE_DIR } from './constants.js' ;
10+ import { INDEX_CACHE_DIR , REPOS_CACHE_DIR } from './constants.js' ;
1111import { RepoPermissionSyncer } from './ee/repoPermissionSyncer.js' ;
1212import { UserPermissionSyncer } from "./ee/userPermissionSyncer.js" ;
1313import { GithubAppManager } from "./ee/githubAppManager.js" ;
@@ -18,20 +18,6 @@ import { PromClient } from './promClient.js';
1818
1919const logger = createLogger ( 'backend-entrypoint' ) ;
2020
21- const getSettings = async ( configPath ?: string ) => {
22- if ( ! configPath ) {
23- return DEFAULT_SETTINGS ;
24- }
25-
26- const config = await loadConfig ( configPath ) ;
27-
28- return {
29- ...DEFAULT_SETTINGS ,
30- ...config . settings ,
31- }
32- }
33-
34-
3521const reposPath = REPOS_CACHE_DIR ;
3622const indexPath = INDEX_CACHE_DIR ;
3723
@@ -57,8 +43,7 @@ redis.ping().then(() => {
5743
5844const promClient = new PromClient ( ) ;
5945
60- const settings = await getSettings ( env . CONFIG_PATH ) ;
61-
46+ const settings = await getConfigSettings ( env . CONFIG_PATH ) ;
6247
6348if ( hasEntitlement ( 'github-app' ) ) {
6449 await GithubAppManager . getInstance ( ) . init ( prisma ) ;
0 commit comments