Skip to content

Commit

Permalink
fix: Increase the number of projects fetched per request from Atlassi…
Browse files Browse the repository at this point in the history
…an (#9435)

We ran into timeouts in `getAllProjects`, presumably because we're doing
too many roundtrips. As a quick fix, increse the number of projects
fetched per request from 50 to 500.
  • Loading branch information
Dschoordsch committed Feb 20, 2024
1 parent 02dc6fa commit b0b76f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/server/utils/AtlassianServerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ class AtlassianServerManager extends AtlassianManager {
}))
projects.push(...pagedProjects)
if (res.nextPage) {
log('AtlassianServerManager.getAllProjects fetching more results', res.total)
return getProjectPage(cloudId, res.nextPage)
}
}
Expand All @@ -395,7 +396,7 @@ class AtlassianServerManager extends AtlassianManager {
cloudIds.map((cloudId) =>
getProjectPage(
cloudId,
`https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/project/search?orderBy=name`
`https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/project/search?orderBy=name&maxResults=500`
)
)
)
Expand Down

0 comments on commit b0b76f9

Please sign in to comment.