-
-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warmup new executor before replacing old one (#8068)
- Loading branch information
1 parent
2ad60cb
commit 60d8bc1
Showing
17 changed files
with
479 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 0 additions & 96 deletions
96
src/HotChocolate/AspNetCore/src/AspNetCore/Warmup/ExecutorWarmupService.cs
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
src/HotChocolate/AspNetCore/src/AspNetCore/Warmup/RequestExecutorWarmupService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace HotChocolate.AspNetCore.Warmup; | ||
|
||
internal sealed class RequestExecutorWarmupService( | ||
IRequestExecutorWarmup executorWarmup) | ||
: IHostedService | ||
{ | ||
public async Task StartAsync(CancellationToken cancellationToken) | ||
=> await executorWarmup.WarmupAsync(cancellationToken).ConfigureAwait(false); | ||
|
||
public Task StopAsync(CancellationToken cancellationToken) | ||
=> Task.CompletedTask; | ||
} |
25 changes: 0 additions & 25 deletions
25
src/HotChocolate/AspNetCore/src/AspNetCore/Warmup/WarmupSchemaTask.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/HotChocolate/Core/src/Execution/IRequestExecutorWarmup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace HotChocolate.Execution; | ||
|
||
/// <summary> | ||
/// Allows to run the initial warmup for registered <see cref="IRequestExecutor"/>s. | ||
/// </summary> | ||
internal interface IRequestExecutorWarmup | ||
{ | ||
/// <summary> | ||
/// Runs the initial warmup tasks. | ||
/// </summary> | ||
/// <param name="cancellationToken"> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <returns> | ||
/// Returns a task that completes once the warmup is done. | ||
/// </returns> | ||
Task WarmupAsync(CancellationToken cancellationToken); | ||
} |
25 changes: 0 additions & 25 deletions
25
src/HotChocolate/Core/src/Execution/Internal/IInternalRequestExecutorResolver.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.