mirror of
https://github.com/clarencechaan/ufc-cal.git
synced 2026-10-19 00:38:30 -07:00
Update events in events.json in parallel rather than series
This commit is contained in:
1 parent
cb8e32be66
commit
18aa02a074
1 file changed
+3
-1
@@ -93,9 +93,11 @@ async function updateEventsFile() {
|
||||
if (new Date(events[i].LiveEventDetail.StartTime) < Date.now()) continue;
|
||||
|
||||
console.log("Updating event", events[i].LiveEventDetail.EventId);
|
||||
events[i] = await fetchEvent(events[i].LiveEventDetail.EventId);
|
||||
events[i] = fetchEvent(events[i].LiveEventDetail.EventId);
|
||||
}
|
||||
|
||||
events = await Promise.all(events);
|
||||
|
||||
// Starting from the latest event ID previously found, find and add any
|
||||
// new events
|
||||
let eventId = events[0].LiveEventDetail.EventId;
|
||||
|
||||
Reference in new issue
Block a user