This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async getLearningCapsulesForBranch(branchUuid: string) { | |
const TOPICS = await this.getTopicsAndSubtopics(branchUuid); | |
return this.getLearningCapsules(TOPICS); | |
} | |
private async getLearningCapsulesForPathway(pathwayUuid: string): Promise<LearningCapsuleStructure[]> { | |
const PATHWAY_BRANCHES = await this.getBranchesByPathway(pathwayUuid); | |
let allLearningCapsules = []; | |
for (const branch of PATHWAY_BRANCHES) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async getLearningCapsulesForPathway(pathwayUuid: string): Promise<LearningCapsuleStructure[]> { | |
const PATHWAY_BRANCHES = await this.getBranchesByPathway(pathwayUuid); | |
// Ejecutar getLearningCapsulesForBranch para todas las ramas en paralelo | |
const capsulesPromises = PATHWAY_BRANCHES.map(branch => | |
this.getLearningCapsulesForBranch(branch.branchUuid) | |
); | |
// Esperar a que todas las promesas se resuelvan | |
const capsulesArrays = await Promise.all(capsulesPromises); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Utiliza la imagen base de Node.js en Ubuntu para plataforma AMD64 | |
FROM --platform=linux/amd64 node:lts | |
# Define variables de entorno | |
ARG LAMBDA_TASK_ROOT="/app" | |
ARG LAMBDA_RUNTIME_DIR="/usr/local/bin" | |
ARG PLATFORM="linux/amd64" | |
# Establece el directorio de trabajo | |
WORKDIR ${LAMBDA_TASK_ROOT} |