Skip to content

Commit

Permalink
fix(epic-web): add a comment about the sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhooks committed Jun 21, 2023
1 parent 6221e0d commit 82e83aa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/epic-web/src/pages/api/inngest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const processNewTip = inngest.createFunction(

const transcript = await step.waitForEvent('tip/video.transcript.created', {
match: 'data.videoResourceId',
timeout: '24h',
timeout: '1h',
})

if (transcript) {
Expand Down Expand Up @@ -198,6 +198,11 @@ const processNewTip = inngest.createFunction(
})

await step.run('Send Transcript for LLM Suggestions', async () => {
// this step initiates a call to worker and then doesn't bother waiting for a response
// the sleep is just a small hedge to make sure we don't close the connection immediately
// but the worker seems to run just fine if we don't bother waiting for a response
// this isn't great, really, but waiting for the worker response times it out consistently
// even with shorter content
fetch(
`https://deepgram-wrangler.skillstack.workers.dev/tipMetadataLLM?videoResourceId=${event.data.videoResourceId}`,
{
Expand All @@ -218,7 +223,7 @@ const processNewTip = inngest.createFunction(
'tip/video.llm.suggestions.created',
{
match: 'data.videoResourceId',
timeout: '24h',
timeout: '1h',
},
)

Expand All @@ -242,7 +247,7 @@ const processNewTip = inngest.createFunction(
return {transcript, llmSuggestions: null}
}
} else {
throw new Error('Transcript not created within 24 hours')
throw new Error('Transcript not created within 1 hours')
}
},
)
Expand Down

6 comments on commit 82e83aa

@vercel
Copy link

@vercel vercel bot commented on 82e83aa Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

technical-interviews – ./apps/technical-interviews

technical-interviews-skillrecordings.vercel.app
technical-interviews-git-main-skillrecordings.vercel.app
technical-interviews-sri.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 82e83aa Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 82e83aa Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 82e83aa Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 82e83aa Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 82e83aa Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.