Skip to content

Commit

Permalink
Merge pull request #628 from 1ifeworld/salief/adjust-max-duration-of-…
Browse files Browse the repository at this point in the history
…revalidation-helper

adjust max duration of server actions on each relevant page
  • Loading branch information
salieflewis authored Jun 1, 2024
2 parents 0fa483c + ae273d8 commit 69bee82
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/site/app/(base)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { getAllAdds } from '@/gql'
import { ItemCard } from '@/server'
import { ItemDropdown, PaginationControls } from '@/client'

export const maxDuration = 30 // This function can run for a maximum of 30 seconds

export default async function Home({
searchParams,
}: { searchParams: { [key: string]: string | string[] | undefined } }) {
Expand Down
2 changes: 2 additions & 0 deletions apps/site/app/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { ChannelCard } from '@/server'
import { pluralize, sortChannels } from '@/utils'
import { ChannelDialog, NewChannelTrigger, UserSettings } from '@/client'

export const maxDuration = 30 // This function can run for a maximum of 30 seconds

export default async function Profile({
params,
}: {
Expand Down
4 changes: 3 additions & 1 deletion apps/site/app/channel/[id]/[index]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { kv } from '@vercel/kv'
import { P, match } from 'ts-pattern'
import { AudioPlayer, VideoPlayer } from '@/client'
import { Flex, Stack, Typography, Separator } from '@/design-system'
import { getChannelWithId, getAddWithChannelIndex } from '@/gql'
import { getAddWithChannelIndex } from '@/gql'
import {
type MediaAssetObject,
ipfsUrlToCid,
Expand Down Expand Up @@ -36,6 +36,8 @@ const PdfViewer = dynamic(
{ ssr: false },
)

export const maxDuration = 30 // This function can run for a maximum of 30 seconds

export default async function ItemPage({
params,
searchParams,
Expand Down
2 changes: 2 additions & 0 deletions apps/site/app/channel/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
RecentChannels,
} from '@/server'

export const maxDuration = 30 // This function can run for a maximum of 30 seconds

export default async function Channel({
params,
searchParams,
Expand Down

0 comments on commit 69bee82

Please sign in to comment.