NuGet.Services.Work.InvocationQueue.Extend C# (CSharp) Метод

Extend() публичный Метод

Extends the visibility timeout of the request. That is, the time during which the queue message is hidden from other clients
public Extend ( InvocationState invocation, System.TimeSpan duration ) : Task
invocation InvocationState
duration System.TimeSpan The duration from the time of invocation to hide the message
Результат Task
        public virtual async Task<bool> Extend(InvocationState invocation, TimeSpan duration)
        {
            var invisibleUntil = _clock.UtcNow + duration;
            var newVersion = await ConnectAndExec(
                "work.ExtendInvocation",
                new
                {
                    Id = invocation.Id,
                    Version = invocation.CurrentVersion,
                    ExtendTo = invisibleUntil.UtcDateTime,
                    InstanceName = InstanceName
                });

            return ProcessResult(invocation, newVersion);
        }