0

I have two azure functions, one is HttpTrigger, one is QueueTrigger. The purpose of the http trigger is to get some data from some service and put it in blob storage. The purpose of queue trigger is to get that data from blob storage and save it in local database. When http trigger finish the job, the queue trigger is triggered automatically.

I am wondering how can I know when the queue function is finished programmatically? So, I have some service which is calling this http trigger function:

        public async Task<HttpResponseMessage> CallHttpAzureFunction(int someParameter)
        {
            var client = new HttpClient();

            var azureFunctionsPath = "someRandomPath";
            var url = $"{azureFunctionsPath}/{AzureFunctionConstant.NameOfFunction}";
            var request = "not important"            

            var response await client.PostAsync(url, new StringContent(JsonConvert.SerializeObject(request)));

            if (response.Result.IsSuccessStatusCode)
            {
                //Check the status of queue function, if it is finished, call the database to get that data
            }
        }
user16358371
  • 101
  • 1
  • 7
  • You don't. Have that last part be done by the queue-triggered function or by a function it triggers when it's done. – Fildor Mar 10 '22 at 11:28

1 Answers1

0

Currently, you can't get the status of the azure function but if it is a durable function you can redirect the client to a status endpoint that the client polls to learn when the operation is finished.

REFERENCES:

  1. How to check the status of a Function
  2. Durable Functions Overview
  3. How to check running status and stop Durable function
SwethaKandikonda
  • 7,513
  • 2
  • 4
  • 18