Skip to content

Commit

Permalink
Merge pull request #358 from neozhu/datagrid
Browse files Browse the repository at this point in the history
Update DocumentCreatedEventHandler.cs
  • Loading branch information
neozhu authored Apr 20, 2023
2 parents a08c610 + 98cc1d6 commit 39bd782
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ ILogger<DocumentCreatedEventHandler> logger
_logger = logger;

}
public async Task Handle(CreatedEvent<Document> notification, CancellationToken cancellationToken)
public Task Handle(CreatedEvent<Document> notification, CancellationToken cancellationToken)
{
_logger.LogInformation("begin recognition: {id}", notification.Entity.Id);
var domainEvent = notification.Entity;
var id = domainEvent.Id;
IDocumentOcrJob _ocrJob = _scopeFactory.CreateScope().ServiceProvider.GetRequiredService<IDocumentOcrJob>();
BackgroundJob.Enqueue(() => _ocrJob.Do(id));

return Task.CompletedTask;
}
}

0 comments on commit 39bd782

Please sign in to comment.