@zodic/shared 0.0.303 → 0.0.305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -603,6 +603,7 @@ export class ArchetypeService {
|
|
|
603
603
|
.from(schema.archetypesData)
|
|
604
604
|
.groupBy(schema.archetypesData.combination)
|
|
605
605
|
.having(sql`count(*) < 12`)
|
|
606
|
+
.limit(400)
|
|
606
607
|
.execute();
|
|
607
608
|
|
|
608
609
|
const typedResult = result.map((row) => ({
|
|
@@ -793,14 +794,17 @@ export class ArchetypeService {
|
|
|
793
794
|
`🎉 [Batch] Completed regenerating ${compositions.length} combinations`
|
|
794
795
|
);
|
|
795
796
|
}
|
|
796
|
-
|
|
797
|
+
|
|
797
798
|
async fetchMissingArchetypeCompositions(): Promise<Composition[]> {
|
|
798
799
|
const db = this.context.drizzle();
|
|
799
800
|
const incomplete = await this.findIncompleteCombinations();
|
|
801
|
+
console.log(`🔎 [Fetch] Retrieved ${incomplete.length} incomplete combinations`);
|
|
802
|
+
const limited = incomplete.slice(0, 400);
|
|
800
803
|
|
|
801
804
|
const compositions: Composition[] = [];
|
|
802
805
|
|
|
803
|
-
for (const { combination } of
|
|
806
|
+
for (const { combination } of limited) {
|
|
807
|
+
console.log(`🔍 [Fetch] Processing combination: ${combination}`);
|
|
804
808
|
const [sun, ascendant, moon] = combination.split('-') as ZodiacSignSlug[];
|
|
805
809
|
|
|
806
810
|
const existing = await db
|
|
@@ -829,13 +833,13 @@ export class ArchetypeService {
|
|
|
829
833
|
moon,
|
|
830
834
|
indexesToGenerate,
|
|
831
835
|
});
|
|
836
|
+
console.log(`✅ [Fetch] Will regenerate indexes [${indexesToGenerate.join(', ')}] for ${combination}`);
|
|
832
837
|
}
|
|
833
838
|
}
|
|
834
839
|
|
|
835
|
-
console.log(
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
840
|
+
console.log(`📦 [Fetch] Total compositions to regenerate (limited to 400): ${compositions.length}`);
|
|
841
|
+
|
|
842
|
+
|
|
839
843
|
return compositions;
|
|
840
844
|
}
|
|
841
845
|
}
|