Is it OK to use Task.Delay inside an Azure Durable Function Activity like this?
I am polling storage for data that should arrive within 20-30 seconds or so.
while (requestAccepted && retryCount < 8)
{
object savedData = await DataManagementService.GetSessionData(processSessionId);
if (savedData != null && savedData.GetType().GetProperties().Any())
{
return true;
}
await Task.Delay(TimeSpan.FromSeconds(10));
retryCount++;
}
The function timers feature using context.CreateTimer
, explained here, is only available to Azure Orchestration Function and not Activity Function.