feat: enforce branches with seeds (#1064)

This commit is contained in:
zkldi
2024-05-08 20:03:42 +01:00
committed by GitHub
parent 4a80b1f516
commit 8167fb3fc5
3 changed files with 14 additions and 11 deletions
+5 -2
View File
@@ -7,7 +7,7 @@ import fjsh from "fast-json-stable-hash";
import { PullDatabaseSeeds } from "lib/database-seeds/repo";
import CreateLogCtx from "lib/logger/logger";
import UpdateIsPrimaryStatus from "lib/score-mutation/update-isprimary";
import { TachiConfig } from "lib/setup/config";
import { ServerConfig, TachiConfig } from "lib/setup/config";
import { RemoveStaleFolderShowcaseStats } from "lib/showcase/showcase";
import { UpdateQuestSubscriptions } from "lib/targets/quests";
import { RecalcAllScores } from "utils/calculations/recalc-scores";
@@ -357,7 +357,10 @@ async function SynchroniseDBWithSeeds() {
// Wait for mongo to connect first.
await monkDB.then(() => void 0);
const databaseSeedsRepo = await PullDatabaseSeeds(options.localPath);
const databaseSeedsRepo = await PullDatabaseSeeds(
options.localPath,
ServerConfig.SEEDS_CONFIG?.BRANCH
);
for await (const { collectionName, data } of databaseSeedsRepo.IterateCollections()) {
const spawnLogger = CreateLogCtx(`${collectionName} Sync`);