Skip to content

Commit

Permalink
Send svix identifiers only, while full payload ends up in S3 for late…
Browse files Browse the repository at this point in the history
…r retrieval (#144)

Co-authored-by: Aleks <aleks@wordcab.com>
  • Loading branch information
aleksandr-smechov and Aleks authored Jul 16, 2023
1 parent fc73124 commit 25bab1d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions wordcab_transcribe/router/v1/cortex_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
)
from wordcab_transcribe.router.v1.audio_url_endpoint import inference_with_audio_url
from wordcab_transcribe.router.v1.youtube_endpoint import inference_with_youtube
from wordcab_transcribe.utils import remove_words_for_svix


router = APIRouter()
Expand Down Expand Up @@ -121,9 +120,12 @@ async def run_cortex(
"request_id": request_id,
}

await send_update_with_svix(
payload.job_name, "finished", remove_words_for_svix(_cortex_response)
)
_svix_response = {
"job_name": payload.job_name,
"request_id": request_id,
}

await send_update_with_svix(payload.job_name, "finished", _svix_response)

if payload.url_type == "youtube":
return CortexYoutubeResponse(**_cortex_response)
Expand Down

0 comments on commit 25bab1d

Please sign in to comment.