@@ -11,6 +11,7 @@ import { indexGitRepository } from "./zoekt.js";
1111import os from 'os' ;
1212import { PromClient } from './promClient.js' ;
1313import * as Sentry from "@sentry/node" ;
14+
1415interface IRepoManager {
1516 blockingPollLoop : ( ) => void ;
1617 dispose : ( ) => void ;
@@ -177,8 +178,7 @@ export class RepoManager implements IRepoManager {
177178
178179 const config = connection . config as unknown as GithubConnectionConfig | GitlabConnectionConfig | GiteaConnectionConfig ;
179180 if ( config . token ) {
180- const tokenResult = await getTokenFromConfig ( config . token , connection . orgId , db ) ;
181- token = tokenResult ?. token ;
181+ token = await getTokenFromConfig ( config . token , connection . orgId , db , this . logger ) ;
182182 if ( token ) {
183183 break ;
184184 }
@@ -207,7 +207,7 @@ export class RepoManager implements IRepoManager {
207207 this . logger . info ( `Fetching ${ repo . id } ...` ) ;
208208
209209 const { durationMs } = await measure ( ( ) => fetchRepository ( repoPath , ( { method, stage, progress } ) => {
210- // this.logger.info (`git.${method} ${stage} stage ${progress}% complete for ${repo.id}`)
210+ this . logger . debug ( `git.${ method } ${ stage } stage ${ progress } % complete for ${ repo . id } ` )
211211 } ) ) ;
212212 fetchDuration_s = durationMs / 1000 ;
213213
@@ -234,7 +234,7 @@ export class RepoManager implements IRepoManager {
234234 }
235235
236236 const { durationMs } = await measure ( ( ) => cloneRepository ( cloneUrl . toString ( ) , repoPath , metadata . gitConfig , ( { method, stage, progress } ) => {
237- // this.logger.info (`git.${method} ${stage} stage ${progress}% complete for ${repo.id}`)
237+ this . logger . debug ( `git.${ method } ${ stage } stage ${ progress } % complete for ${ repo . id } ` )
238238 } ) ) ;
239239 cloneDuration_s = durationMs / 1000 ;
240240
@@ -243,7 +243,7 @@ export class RepoManager implements IRepoManager {
243243 }
244244
245245 this . logger . info ( `Indexing ${ repo . id } ...` ) ;
246- const { durationMs } = await measure ( ( ) => indexGitRepository ( repo , this . ctx ) ) ;
246+ const { durationMs } = await measure ( ( ) => indexGitRepository ( repo , this . settings , this . ctx ) ) ;
247247 const indexDuration_s = durationMs / 1000 ;
248248 this . logger . info ( `Indexed ${ repo . id } in ${ indexDuration_s } s` ) ;
249249
0 commit comments