Skip to content

Commit 5391dc2

Browse files
committed
gh-347 Remove incomplete payloads on timeout
Signed-off-by: Victor Chang <[email protected]>
1 parent 4906d18 commit 5391dc2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/InformaticsGateway/Services/Connectors/PayloadAssembler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2022 MONAI Consortium
2+
* Copyright 2021-2023 MONAI Consortium
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -149,7 +149,7 @@ private async void OnTimedEvent(Object source, System.Timers.ElapsedEventArgs e)
149149
_logger.BucketRemoveError(key);
150150
}
151151
}
152-
else if (payload.AnyUploadFailures())
152+
else
153153
{
154154
_payloads.TryRemove(key, out _);
155155
_logger.PayloadRemovedWithFailureUploads(key);

src/InformaticsGateway/Services/Storage/ObjectUploadService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2022 MONAI Consortium
2+
* Copyright 2021-2023 MONAI Consortium
33
* Copyright 2019-2021 NVIDIA Corporation
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -103,7 +103,7 @@ private async Task StartWorker(int thread, CancellationToken cancellationToken)
103103
{
104104
try
105105
{
106-
var item = await _uplaodQueue.Dequeue(cancellationToken);
106+
var item = await _uplaodQueue.Dequeue(cancellationToken).ConfigureAwait(false);
107107
await ProcessObject(item).ConfigureAwait(false);
108108
}
109109
catch (OperationCanceledException ex)

0 commit comments

Comments
 (0)