1
0

perf: Parse teachers only once, not for every day

This commit is contained in:
2025-10-23 11:34:20 +02:00
parent 4663c82c25
commit 2fa8a774b4

View File

@@ -6,6 +6,7 @@ import parseTeachers from "./utils/parseTeachers.js"
export default async function parseThisShit(downloadedFilePath) {
const workbook = new ExcelJS.Workbook();
await workbook.xlsx.readFile(downloadedFilePath);
const teacherMap = await parseTeachers();
const sheetNames = workbook.worksheets.map((sheet) => sheet.name);
@@ -132,7 +133,6 @@ export default async function parseThisShit(downloadedFilePath) {
});
if (absenceKey) {
const teacherMap = await parseTeachers();
const absenceCell = currentSheet.getCell(absenceKey);
const rowNumber = absenceCell.row;
const allAbsenceKeys = [];