Skip to content

Commit

Permalink
limt fetchAllHubs to avoid timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ejf89 committed Jan 31, 2024
1 parent 201198d commit 038ae1b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ const ReleasePage = (props) => {

export default ReleasePage

export const getStaticPaths = async (context) => {
export const getStaticPaths = async () => {
await initSdkIfNeeded(true)
const paths = []
try {
const { hubs } = await NinaSdk.Hub.fetchAll({ limit: 1000 })
const { hubs } = await NinaSdk.Hub.fetchAll({
limit: 10,
offset: 0,
sort: 'desc',
})
for await (const hub of hubs) {
const { releases } = await NinaSdk.Hub.fetchReleases(hub.publicKey)
releases.forEach((release) => {
Expand Down

0 comments on commit 038ae1b

Please sign in to comment.