Status "in-queue"

Hi! I am running my serverless endpoint in sync mode. Sometimes I get response like
{'delayTime': 85437, 'id': 'sync-822bbbf3-bae5-4efa-bbfa-9658ffda0175-u1', 'status': 'IN_PROGRESS'} or status in-queue. 1) why in sync mode it sends back in complete response? 2) how to get an actual completed response after I get the above response?
9 Replies
nerdylive
nerdylive4mo ago
1. Because sync is meant to wait until completion, unless its 60~ seconds after and your job hasn't completed 2. Use the /status to check, maybe every second if it returns in progress or complete
EngrBilal.
EngrBilal.4mo ago
How am I supposed to check status every second? Isn't it like the request response cycle gets completed after it sends me back status in progress ?
nerdylive
nerdylive4mo ago
No, thats the way it is if you have the status button, click it many times to check and if you're on program, use loop and hit that many times until its complete try to Learn HTTP its gonna help you gain more insights about this, it returns that response you pasted, the connection is probably already closed so theres no more continuing until you try to hit another one
EngrBilal.
EngrBilal.4mo ago
Sorry I got that wrong,it's /status endpoint and not the keyword
nerdylive
nerdylive4mo ago
hmm okay okay glad you've got it!
flash-singh
flash-singh4mo ago
you can use /status-sync instead of /status, it will do blocking call like runsync
nerdylive
nerdylive4mo ago
Does it waits indefinitely while job is running unlike the /runsync which cancels out and returns the job id with IN_PROGRESS after like 60secs~
flash-singh
flash-singh4mo ago
its same 60s, its due to cloudflare timeouts
nerdylive
nerdylive4mo ago
Ahh ic
Want results from more Discord servers?
Add your server