Skip to content

Instantly share code, notes, and snippets.

View jbmarflo's full-sized avatar

Joseph Marcilla jbmarflo

View GitHub Profile
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) {
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);
# 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}