Created
September 1, 2023 10:24
-
-
Save bjoerntx/7136aaf63f4da8c0d8b1da159a4df1c8 to your computer and use it in GitHub Desktop.
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
public async Task DoWork(CancellationToken cancellationToken) | |
{ | |
while (!cancellationToken.IsCancellationRequested) | |
{ | |
ProcessingRequest request = new ProcessingRequest(null); | |
if (request.Id == null) | |
{ | |
logger.LogInformation("No request found in queue"); | |
await Task.Delay(1000, cancellationToken); | |
continue; | |
} | |
else | |
{ | |
TextControlProcessing.Merge(request); | |
logger.LogInformation("Request found - executing worker"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment