Sync endpoint returns prematurely
Sync endpoint sometimes randomly (about half of the time) responds prematurely with in progress json. The job finished however, I need the sync not to respond until the job is done.
6 Replies
Oh its because your job runs longer than 60s
then it'll return in_progress
so, its better to use webhook back to your server(read docs), or use /run + pinging /status every once in a while or some other delay you can custom
OHh so If I keep pining the connection will stay alive?
No, it will return in progress or completed
But since you are pinging constantly, you will get updated status when you ping it
If you use webhook it will reach out to your server when it's done
Depends which you would use
How do I force the connection to stay longer? @nerdylive Currently our architecture doesnt support async
Just need temporary quick solution to use /runsync
Ah, thats impossible unfortunately
well, make your do.. there are 2 ways as i noted above
i don't think there is such if your run is long
you can use webhook, after job done, it will notify you with result.
https://docs.runpod.io/serverless/endpoints/send-requests#webhooks
Send a request | RunPod Documentation
Learn how to construct a JSON request body to send to your custom endpoint, including optional inputs for webhooks, execution policies, and S3-compatible storage, to optimize job execution and resource management.