From 0432dae12451ac8a2536ec59c78827fce507e5c0 Mon Sep 17 00:00:00 2001 From: lemaitre-aneo Date: Mon, 17 Jun 2024 16:04:01 +0200 Subject: [PATCH] Add logs --- Client/src/Unified/Services/Submitter/Service.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Client/src/Unified/Services/Submitter/Service.cs b/Client/src/Unified/Services/Submitter/Service.cs index f5ce0613..a1130831 100644 --- a/Client/src/Unified/Services/Submitter/Service.cs +++ b/Client/src/Unified/Services/Submitter/Service.cs @@ -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);