mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
fix(repoManager): Don't fetch files for each repo on validation (#414)
This commit is contained in:
parent
48269781b7
commit
e47fdb51db
1 changed files with 1 additions and 2 deletions
|
|
@ -552,8 +552,8 @@ export class RepoManager implements IRepoManager {
|
|||
return;
|
||||
}
|
||||
|
||||
const files = readdirSync(this.ctx.indexPath);
|
||||
const reposToReindex: number[] = [];
|
||||
|
||||
for (const repo of indexedRepos) {
|
||||
const shardPrefix = getShardPrefix(repo.orgId, repo.id);
|
||||
|
||||
|
|
@ -561,7 +561,6 @@ export class RepoManager implements IRepoManager {
|
|||
// would need to know how many total shards are expected for this repo
|
||||
let hasShards = false;
|
||||
try {
|
||||
const files = readdirSync(this.ctx.indexPath);
|
||||
hasShards = files.some(file => file.startsWith(shardPrefix));
|
||||
} catch (error) {
|
||||
logger.error(`Failed to read index directory ${this.ctx.indexPath}: ${error}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue