perf: Parse teachers only once, not for every day
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user