diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9730fab7..8afbe73b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.x + dotnet-version: 8.x - name: Build run: dotnet build --configuration Release - name: Test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7b562c82..b9228ce6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.x + dotnet-version: 8.x - name: Build run: dotnet build --configuration Release - name: Test diff --git a/Directory.Build.props b/Directory.Build.props index 857dd843..abdec9c0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,7 +19,7 @@ - net7.0 + net8.0 enable latest enable diff --git a/README.Nuget.md b/README.Nuget.md index 09652740..d2528622 100644 --- a/README.Nuget.md +++ b/README.Nuget.md @@ -26,7 +26,7 @@ TODO: These two abilities should be provided independently of each other. Unfort Installation is performed via [NuGet.](https://www.nuget.org/packages/SignalR.Orleans/) -Packages with version `7.x.x` are compatible with Orleans `v7.x.x` and above. If you're still using an earlier version of Orleans, you will need to use earlier versions of the package. +Packages with version `8.x.x` are compatible with Orleans `v8.x.x` and above. If you're still using an earlier version of Orleans, you will need to use earlier versions of the package. Package Manager: diff --git a/README.md b/README.md index a8b15a6d..9a45983b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ TODO: These two abilities should be provided independently of each other. Unfort Installation is performed via [NuGet.](https://www.nuget.org/packages/SignalR.Orleans/) -Packages with version `7.x.x` are compatible with Orleans `v7.x.x` and above. If you're still using an earlier version of Orleans, you will need to use earlier versions of the package. +Packages with version `8.x.x` are compatible with Orleans `v8.x.x` and above. If you're still using an earlier version of Orleans, you will need to use earlier versions of the package. Package Manager: diff --git a/samples/Silo/Silo.csproj b/samples/Silo/Silo.csproj index 1496f4a2..de10f9e6 100644 --- a/samples/Silo/Silo.csproj +++ b/samples/Silo/Silo.csproj @@ -2,14 +2,15 @@ Exe - net7.0 + net8.0 enable enable - - + + + diff --git a/src/SignalR.Orleans/ServerDirectory/ServerDirectoryGrain.cs b/src/SignalR.Orleans/ServerDirectory/ServerDirectoryGrain.cs index 8380ee5f..1fd97c18 100644 --- a/src/SignalR.Orleans/ServerDirectory/ServerDirectoryGrain.cs +++ b/src/SignalR.Orleans/ServerDirectory/ServerDirectoryGrain.cs @@ -36,12 +36,9 @@ public Task OnActivateAsync(CancellationToken cancellationToken) _logger.LogInformation("Available servers {serverIds}", string.Join(", ", _state.State.ServerHeartBeats?.Count > 0 ? string.Join(", ", _state.State.ServerHeartBeats) : "empty")); - _timerRegistry.RegisterTimer( - this.GrainContext, - ValidateAndCleanUp, - _state.State, - TimeSpan.FromSeconds(15), - TimeSpan.FromMinutes(SERVERDIRECTORY_CLEANUP_IN_MINUTES)); + _timerRegistry.RegisterGrainTimer(this.GrainContext, ValidateAndCleanUp, + _state.State, new GrainTimerCreationOptions(TimeSpan.FromSeconds(15), + TimeSpan.FromMinutes(SERVERDIRECTORY_CLEANUP_IN_MINUTES))); return Task.CompletedTask; } @@ -62,7 +59,7 @@ public async Task Unregister(Guid serverId) await _state.WriteStateAsync(); } - private async Task ValidateAndCleanUp(object serverDirectory) + private async Task ValidateAndCleanUp(ServerDirectoryState serverDirectory, CancellationToken token) { var inactiveTime = DateTime.UtcNow.AddMinutes(-SERVERDIRECTORY_CLEANUP_IN_MINUTES); var expiredHeartBeats = _state.State.ServerHeartBeats.Where(heartBeat => heartBeat.Value < inactiveTime).ToList(); diff --git a/src/SignalR.Orleans/SignalR.Orleans.csproj b/src/SignalR.Orleans/SignalR.Orleans.csproj index f8d3b21c..a2307fe7 100644 --- a/src/SignalR.Orleans/SignalR.Orleans.csproj +++ b/src/SignalR.Orleans/SignalR.Orleans.csproj @@ -13,8 +13,9 @@ - - + + + diff --git a/test/SignalR.Orleans.Tests/SignalR.Orleans.Tests.csproj b/test/SignalR.Orleans.Tests/SignalR.Orleans.Tests.csproj index c6712f0d..84a014dc 100644 --- a/test/SignalR.Orleans.Tests/SignalR.Orleans.Tests.csproj +++ b/test/SignalR.Orleans.Tests/SignalR.Orleans.Tests.csproj @@ -7,15 +7,16 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all