Skip to content

Commit

Permalink
fix(export): correctif rapide pour la mise en prod des données (#1349)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot authored Apr 3, 2024
1 parent 09d04fd commit a9c6ee9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions targets/export-elasticsearch/src/ingester/cdtnDocuments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ export async function cdtnDocumentsGen(
);
};

logger.info("=== Editorial contents ===");
const documents = await getDocumentBySource<EditorialContentDoc>(
SOURCES.EDITORIAL_CONTENT,
getBreadcrumbs
);
const {
documents: editorialContents,
relatedIdsDocuments: relatedIdsEditorialDocuments,
} = await generateEditorialContents(documents, addGlossary);
documentsCount = {
...documentsCount,
[SOURCES.EDITORIAL_CONTENT]: editorialContents.length,
};

logger.info("=== Courriers ===");
const modelesDeCourriers = await getDocumentBySource(
SOURCES.LETTERS,
Expand Down Expand Up @@ -390,6 +376,20 @@ export async function cdtnDocumentsGen(
};
await updateDocs(SOURCES.CDT, cdtDoc);

logger.info("=== Editorial contents ===");
const documents = await getDocumentBySource<EditorialContentDoc>(
SOURCES.EDITORIAL_CONTENT,
getBreadcrumbs
);
const {
documents: editorialContents,
relatedIdsDocuments: relatedIdsEditorialDocuments,
} = await generateEditorialContents(documents, addGlossary);
documentsCount = {
...documentsCount,
[SOURCES.EDITORIAL_CONTENT]: editorialContents.length,
};

logger.info("=== Merge Related Documents ===");
const allDocuments = [
...editorialContents,
Expand Down

0 comments on commit a9c6ee9

Please sign in to comment.