Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Nov 4, 2023
1 parent f2201eb commit ee47798
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/pds/src/migrate-script/migrate-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ export const runScript = async () => {
let completed = 0
let failed = 0
for (const status of todo) {
let pdsId = status.pdsId
if (!pdsId) {
pdsId = pdsInfos[pdsCounter % pdsInfos.length].id
if (!status.pdsId) {
status.pdsId = pdsInfos[pdsCounter % pdsInfos.length].id
pdsCounter++
}
const pdsInfo = pdsInfos.find((info) => info.id === pdsId)
const pdsInfo = pdsInfos.find((info) => info.id === status.pdsId)
if (!pdsInfo) {
throw new Error(`could not find pds with id: ${pdsId}`)
throw new Error(`could not find pds with id: ${status.pdsId}`)
}
try {
await migrateRepo(ctx, db, pdsInfo, status, adminToken)
Expand Down

0 comments on commit ee47798

Please sign in to comment.