mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-03-21 17:54:13 -05:00
Update festival data in parallel
This commit is contained in:
parent
279671896e
commit
002ca2e34a
|
|
@ -43,7 +43,7 @@ export default class FestivalRankingUpdater extends DataUpdater
|
|||
async getData(locale) {
|
||||
const data = await this.splatnet(locale).getFestRankingData(this.festID);
|
||||
|
||||
for (const team of data.data.fest.teams) {
|
||||
await Promise.all(data.data.fest.teams.map(async (team) => {
|
||||
let pageInfo = team.result?.rankingHolders?.pageInfo;
|
||||
|
||||
while (pageInfo?.hasNextPage) {
|
||||
|
|
@ -62,7 +62,7 @@ export default class FestivalRankingUpdater extends DataUpdater
|
|||
|
||||
pageInfo = page.data.node.result.rankingHolders.pageInfo;
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export default class FestivalUpdater extends DataUpdater
|
|||
// Get the detailed data for each Splatfest
|
||||
// (unless we're getting localization-specific data)
|
||||
if (locale === this.defaultLocale) {
|
||||
for (let node of result.data.festRecords.nodes) {
|
||||
await Promise.all(result.data.festRecords.nodes.map(async node => {
|
||||
let detailResult = await this.getFestivalDetails(node);
|
||||
|
||||
Object.assign(node, detailResult.data.fest);
|
||||
|
|
@ -93,7 +93,7 @@ export default class FestivalUpdater extends DataUpdater
|
|||
this.console.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user