Answer the question
In order to leave comments, you need to log in
How to organize work with web api from queues?
There is a client that requests something from api (http get method). Api, on the other hand, sends a heavy task to the queue, and upon completion of the task, you need to notify the client about the result. How to get delayed response from web api for each client?
Answer the question
In order to leave comments, you need to log in
Let's say you need to encode a file
. The first call to the api is to upload a file and return a job ID. The server starts the task in the background and writes some results, let's say how many frames it rendered and how much time is left and the status of the task.
Your client polls the address every 10 seconds with a request, well, what's there? Gets these 3 metrics.
When the status is ready, it makes a request to the api with the results or to the error controller
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question