Skip to content

Commit

Permalink
Clears payload at startup (#326)
Browse files Browse the repository at this point in the history
* Fix Mongodb configuration where GUIDs are not deserialized correctly

Remove pending payloads only when MachineName matches.

* Update changelog

Signed-off-by: Victor Chang <vicchang@nvidia.com>
  • Loading branch information
mocsharp authored Feb 5, 2023
1 parent 2831d3c commit 7ad457a
Show file tree
Hide file tree
Showing 69 changed files with 1,551 additions and 1,156 deletions.
68 changes: 31 additions & 37 deletions doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- :who: mocsharp
:why: Apache-2.0 (https://github.com/castleproject/Core/raw/master/LICENSE)
:versions:
- 5.1.0
- 5.1.1
:when: 2022-08-16 23:05:30.666349504 Z
- - :approve
- ConsoleAppFramework
Expand Down Expand Up @@ -102,7 +102,7 @@
- :who: mocsharp
:why: MIT (https://github.com/GitTools/GitVersion/raw/main/LICENSE)
:versions:
- 5.11.1
- 5.12.0
:when: 2022-08-16 23:05:34.633372053 Z
- - :approve
- HL7-dotnetcore
Expand Down Expand Up @@ -319,70 +319,70 @@
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/main/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-08-16 23:05:48.342748414 Z
- - :approve
- Microsoft.Data.Sqlite.Core
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:49.698463427 Z
- - :approve
- Microsoft.EntityFrameworkCore
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:50.137694970 Z
- - :approve
- Microsoft.EntityFrameworkCore.Abstractions
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:51.008105271 Z
- - :approve
- Microsoft.EntityFrameworkCore.Analyzers
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:51.445711308 Z
- - :approve
- Microsoft.EntityFrameworkCore.Design
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:51.922790944 Z
- - :approve
- Microsoft.EntityFrameworkCore.InMemory
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:52.375150938 Z
- - :approve
- Microsoft.EntityFrameworkCore.Relational
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:52.828879230 Z
- - :approve
- Microsoft.EntityFrameworkCore.Sqlite
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:53.270526921 Z
- - :approve
- Microsoft.EntityFrameworkCore.Sqlite.Core
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.12
- 6.0.13
:when: 2022-08-16 23:05:53.706997823 Z
- - :approve
- Microsoft.Extensions.ApiDescription.Server
Expand Down Expand Up @@ -524,23 +524,23 @@
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.11
- 6.0.12
- 6.0.13
:when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.11
- 6.0.12
- 6.0.13
:when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.11
- 6.0.12
- 6.0.13
:when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.FileProviders.Abstractions
Expand Down Expand Up @@ -689,7 +689,7 @@
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/microsoft/vstest/main/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-09-01 23:06:13.008314524 Z
- - :approve
- Microsoft.NETCore.Platforms
Expand Down Expand Up @@ -739,14 +739,14 @@
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/v17.4.0/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-08-16 23:06:16.175705981 Z
- - :approve
- Microsoft.TestPlatform.TestHost
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/v17.4.0/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-08-16 23:06:17.671459450 Z
- - :approve
- Microsoft.Toolkit.HighPerformance
Expand Down Expand Up @@ -831,14 +831,8 @@
:why: BSD 3-Clause License ( https://raw.githubusercontent.com/moq/moq4/main/License.txt)
:versions:
- 4.18.1
- 4.18.4
:when: 2022-08-16 23:06:23.359197359 Z
- - :approve
- Moq
- :who: mocsharp
:why: BSD 3-Clause License ( https://raw.githubusercontent.com/moq/moq4/main/License.txt)
:versions:
- 4.18.3
:when: 2022-08-16 23:06:23.843184482 Z
- - :approve
- NETStandard.Library
- :who: mocsharp
Expand Down Expand Up @@ -972,28 +966,28 @@
- :who: mocsharp
:why: MIT (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/raw/master/LICENSE)
:versions:
- 6.4.0
- 6.5.0
:when: 2022-08-16 23:06:33.817705411 Z
- - :approve
- Swashbuckle.AspNetCore.Swagger
- :who: mocsharp
:why: MIT (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/raw/master/LICENSE)
:versions:
- 6.4.0
- 6.5.0
:when: 2022-08-16 23:06:34.264757523 Z
- - :approve
- Swashbuckle.AspNetCore.SwaggerGen
- :who: mocsharp
:why: MIT (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/raw/master/LICENSE)
:versions:
- 6.4.0
- 6.5.0
:when: 2022-08-16 23:06:34.716116883 Z
- - :approve
- Swashbuckle.AspNetCore.SwaggerUI
- :who: mocsharp
:why: MIT (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/raw/master/LICENSE)
:versions:
- 6.4.0
- 6.5.0
:when: 2022-08-16 23:06:35.164249703 Z
- - :approve
- System.AppContext
Expand Down Expand Up @@ -2222,7 +2216,7 @@
- :who: mocsharp
:why: MIT (https://github.com/JoshKeegan/xRetry/raw/master/LICENSE)
:versions:
- 1.8.0
- 1.9.0
:when: 2022-08-16 23:07:57.794503140 Z
- - :approve
- xunit
Expand Down Expand Up @@ -2341,21 +2335,21 @@
- :who: mocsharp
:why: BSD 3-Clause License (https://github.com/NLog/NLog/raw/dev/LICENSE.txt)
:versions:
- 5.1.0
- 5.1.1
:when: 2022-10-12 03:14:06.538744982 Z
- - :approve
- NLog.Extensions.Logging
- :who: mocsharp
:why: BSD 2-Clause Simplified License (https://github.com/NLog/NLog.Extensions.Logging/raw/master/LICENSE)
:versions:
- 5.2.0
- 5.2.1
:when: 2022-10-12 03:14:06.964203977 Z
- - :approve
- NLog.Web.AspNetCore
- :who: mocsharp
:why: BSD 3-Clause License (https://github.com/NLog/NLog.Web/raw/master/LICENSE)
:versions:
- 5.2.0
- 5.2.1
:when: 2022-10-12 03:14:07.396706995 Z
- - :approve
- fo-dicom.NLog
Expand Down Expand Up @@ -2397,28 +2391,28 @@
- :who: mocsharp
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
:versions:
- 2.18.0
- 2.19.0
:when: 2022-11-16 23:38:53.891380809 Z
- - :approve
- MongoDB.Driver
- :who: mocsharp
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
:versions:
- 2.18.0
- 2.19.0
:when: 2022-11-16 23:38:54.213853364 Z
- - :approve
- MongoDB.Driver.Core
- :who: mocsharp
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
:versions:
- 2.18.0
- 2.19.0
:when: 2022-11-16 23:38:54.553730219 Z
- - :approve
- MongoDB.Libmongocrypt
- :who: mocsharp
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
:versions:
- 1.6.0
- 1.7.0
:when: 2022-11-16 23:38:54.863359236 Z
- - :approve
- SharpCompress
Expand Down
2 changes: 1 addition & 1 deletion docs/api/rest/fhir.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ limitations under the License.
-->

# DICOMWeb STOW-RS APIs
# FHIR APIs

The `fhir/` endpoint implements the specifications defined in [section 3.1.0 RESTful API](http://hl7.org/implement/standards/fhir/http.html)
defined by HL7 (Health Level 7 International) to enable triggering new workflows. The FHIR service supports multiple versions of the Fast Healthcare Interoperability Resources (FHIR) specifications published by Health Level 7 International (HL7).
Expand Down
4 changes: 4 additions & 0 deletions docs/api/rest/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

- name: Configuration
href: config.md
- name: DICOMWeb STOW
href: dicomweb-stow.md
- name: FHIR
href: fhir.md
- name: Health
href: health.md
- name: Inference Request
Expand Down
8 changes: 8 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@

# Changelog

## 0.3.8

[GitHub Milestone 0.3.8](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/milestone/14)

- Clears payloads that are created by the same instance of MIG at startup.
- Fixes bad Mongodb configuration resulted in GUIDs not being (de)serialized correctly.


## 0.3.7

[GitHub Milestone 0.3.7](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/milestone/13)
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Monai.Deploy.InformaticsGateway.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.11.1">
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Macross.Json.Extensions" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.13" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.19" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.13" />
</ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/Api/Storage/Payload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ public enum PayloadState
private readonly Stopwatch _lastReceived;
private bool _disposedValue;

public Guid PayloadId { get; }
public Guid PayloadId { get; private set; }

public uint Timeout { get; init; }

public string Key { get; init; }

public string? MachineName { get; init; }

public DateTime DateTimeCreated { get; private set; }

public int RetryCount { get; set; }
Expand Down Expand Up @@ -81,6 +83,7 @@ public Payload(string key, string correlationId, uint timeout)
_lastReceived = new Stopwatch();

CorrelationId = correlationId;
MachineName = Environment.MachineName;
DateTimeCreated = DateTime.UtcNow;
PayloadId = Guid.NewGuid();
Key = key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
<PackageReference Include="xRetry" Version="1.8.0" />
<PackageReference Include="xRetry" Version="1.9.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Loading

0 comments on commit 7ad457a

Please sign in to comment.