Allow native guide import to complete without plugin-imposed short timeout
This commit is contained in:
@@ -98,7 +98,9 @@ public sealed class ChannelSyncTask : IScheduledTask
|
||||
}
|
||||
progress.Report(10);
|
||||
var refreshStarted=DateTime.UtcNow;
|
||||
await tasks.Execute(worker,new TaskOptions{MaxRuntimeTicks=TimeSpan.FromMinutes(5).Ticks}).WaitAsync(token).ConfigureAwait(false);
|
||||
// A first seven-day import may take much longer than a channel check.
|
||||
// Keep the native job's ordinary execution/cancellation policy.
|
||||
await tasks.Execute(worker,new TaskOptions()).WaitAsync(token).ConfigureAwait(false);
|
||||
token.ThrowIfCancellationRequested();
|
||||
if(worker.LastExecutionResult?.Status!=TaskCompletionStatus.Completed||worker.LastExecutionResult.StartTimeUtc<refreshStarted.AddSeconds(-1))
|
||||
throw new InvalidOperationException("Native guide refresh did not complete successfully.");
|
||||
|
||||
Reference in New Issue
Block a user