Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo committed Jun 17, 2024
1 parent 035e12f commit 0432dae
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Client/src/Unified/Services/Submitter/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,23 @@ public Service(Properties properties,
cancellationToken),
async chunk =>
{
var taskRequests = chunk.Select(req => ((string?)null, req.Payload, req.Dependencies, req.TaskOptions));
var response = SessionService.ChunkSubmitTasksWithDependenciesAsync(taskRequests,
cancellationToken: cancellationToken);
Logger?.LogInformation("Submitting batch of {NbTask}/{MaxTask}",
chunk.Length,
properties.MaxTasksPerBuffer);
List<(string taskId, string resultId)> tasks;
try
{
var taskRequests = chunk.Select(req => ((string?)null, req.Payload, req.Dependencies, req.TaskOptions));
var response = SessionService.ChunkSubmitTasksWithDependenciesAsync(taskRequests,
cancellationToken: cancellationToken);
tasks = await response.ToListAsync(cancellationToken)
.ConfigureAwait(false);
}
catch (Exception e)
{
Logger?.LogError(e,
"Error while submitting tasks");
foreach (var req in chunk)
{
req.Tcs.SetException(e);
Expand Down

0 comments on commit 0432dae

Please sign in to comment.