Skip to content

Commit

Permalink
Update ImportQuestionCommand.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Aug 19, 2024
1 parent c8ada24 commit 424a1f6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions MyApp.ServiceInterface/App/ImportQuestionCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace MyApp.ServiceInterface.App;

[Tag(Tags.Questions)]
[Worker(Databases.App)]
public class ImportQuestionCommand(ILogger<ImportQuestionCommand> log, AppConfig appConfig) : IAsyncCommand<ImportQuestion>
public class ImportQuestionCommand(ILogger<ImportQuestionCommand> log, AppConfig appConfig) : AsyncCommand<ImportQuestion>
{
static readonly Regex ValidTagCharsRegex = new("[^a-zA-Z0-9#+.]", RegexOptions.Compiled);
static readonly Regex SingleWhiteSpaceRegex = new(@"\s+", RegexOptions.Multiline | RegexOptions.Compiled);
Expand All @@ -31,9 +31,8 @@ public class ImportQuestionCommand(ILogger<ImportQuestionCommand> log, AppConfig

public AskQuestion? Result { get; set; }

public async Task ExecuteAsync(ImportQuestion request)
protected override async Task RunAsync(ImportQuestion request, CancellationToken token)
{
CancellationToken token = new();
if (string.IsNullOrEmpty(request.Url))
throw new ArgumentNullException(nameof(request.Url));

Expand Down

0 comments on commit 424a1f6

Please sign in to comment.