Skip to content

Commit

Permalink
fix: retry on RpcException in envents waitforresults
Browse files Browse the repository at this point in the history
  • Loading branch information
aneojgurhem committed Dec 18, 2023
1 parent 1aafa59 commit e98f2d2
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Client/src/Common/Submitter/EventsClientExt.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
// This file is part of the ArmoniK project
//
// Copyright (C) ANEO, 2021-$CURRENT_YEAR$. All rights reserved.
//
//
// Copyright (C) ANEO, 2021-2023. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

using System;
using System.Collections.Generic;
Expand All @@ -26,6 +25,8 @@
using ArmoniK.Api.gRPC.V1.Results;
using ArmoniK.DevelopmentKit.Client.Common.Exceptions;

using Grpc.Core;

namespace ArmoniK.DevelopmentKit.Client.Common.Submitter;

internal static class EventsClientExt
Expand Down Expand Up @@ -76,7 +77,8 @@ internal static async Task WaitForResultsAsync(this Events.EventsClient client,
resultsNotFound.Select(ResultsFilter),
},
},
});
},
cancellationToken: cancellationToken);
try
{
while (await streamingCall.ResponseStream.MoveNext(cancellationToken))
Expand Down Expand Up @@ -117,7 +119,10 @@ internal static async Task WaitForResultsAsync(this Events.EventsClient client,
}
}
}
catch (OperationCanceledException e)
catch (OperationCanceledException)
{
}
catch (RpcException)
{
}
}
Expand Down

0 comments on commit e98f2d2

Please sign in to comment.