Skip to content

Canceled timer look like in-progress in durable task dashboard #33

@wkoeter-bidn

Description

@wkoeter-bidn

When using this pattern for timeouts, a canceled timer looks like it is still in progress.

https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-timers?tabs=csharp#usage-for-timeout

var o1task = context.CallSubOrchestratorAsync<o1Response>("o1",
    new o1Request();

using (var notificationCts = new CancellationTokenSource())
{
    var timeoutTask = context.CreateTimer(context.CurrentUtcDateTime.AddMinutes(2), notificationCts.Token);

    var completedTask = await Task.WhenAny(o1task, timeoutTask);
    if (completedTask == o1task)
    {
        notificationCts.Cancel();
    }
    else
    {
        var p = await context.CallActivityAsync<string>(nameof(NotifyLongRunningActivity), "");
    }
}

var o1 = await o1task;

After cancelling the timer, the task remains with the "in progress" symbol and the timeline remains active.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions