You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
586 B
22 lines
586 B
3 years ago
|
using Microsoft.Extensions.Hosting;
|
||
|
using System.Threading;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace Sanhe.Abp.AuditLogging.Elasticsearch
|
||
|
{
|
||
|
public class IndexInitializerService : BackgroundService
|
||
|
{
|
||
|
private readonly IIndexInitializer _indexInitializer;
|
||
|
|
||
|
public IndexInitializerService(IIndexInitializer indexInitializer)
|
||
|
{
|
||
|
_indexInitializer = indexInitializer;
|
||
|
}
|
||
|
|
||
|
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||
|
{
|
||
|
await _indexInitializer.InitializeAsync();
|
||
|
}
|
||
|
}
|
||
|
}
|