File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 14
14
15
15
- name : Sync conference data from Sched
16
16
run : |
17
- node --experimental-transform-types scripts/sync-sched/sync.ts --year 2025
17
+ tsx scripts/sync-sched/sync.ts --year 2025
18
18
19
19
- name : Commit changes
20
20
uses : stefanzweifel/git-auto-commit-action@v5
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import assert from "node:assert"
4
4
import { parseArgs } from "node:util"
5
5
import { join } from "node:path"
6
6
import { readFile , writeFile } from "node:fs/promises"
7
+ import pLimit from "p-limit"
7
8
8
9
import {
9
10
getSchedule ,
@@ -159,8 +160,11 @@ async function updateSpeakerDetails(
159
160
160
161
const toUpdate = byUpdateTime . slice ( 0 , quota )
161
162
163
+ const limit = pLimit ( 5 )
162
164
const updated = await Promise . all (
163
- toUpdate . map ( speaker => getSpeakerDetails ( ctx , speaker . username ) ) ,
165
+ toUpdate . map ( speaker =>
166
+ limit ( ( ) => getSpeakerDetails ( ctx , speaker . username ) ) ,
167
+ ) ,
164
168
)
165
169
166
170
for ( const speaker of updated ) {
You can’t perform that action at this time.
0 commit comments