回滚main

This commit is contained in:
橙子
2021-11-09 19:51:35 +08:00
parent 08ba7207bb
commit 2d2dd55cc0
20 changed files with 6 additions and 672 deletions

View File

@@ -27,15 +27,14 @@ namespace Yi.Framework.ElasticSearchProcessor
private readonly ElasticSearchInvoker _elasticSearchInvoker;
private readonly IOptionsMonitor<ElasticSearchOptions> _ElasticSearchOptions = null;
private readonly ISearchService _searchService;
public WarmupESIndexWorker(ILogger<WarmupESIndexWorker> logger, RabbitMQInvoker rabbitMQInvoker, IConfiguration configuration, ElasticSearchInvoker elasticSearchInvoker, IOptionsMonitor<ElasticSearchOptions> optionsMonitor, ISearchService searchService)
public WarmupESIndexWorker(ILogger<WarmupESIndexWorker> logger, RabbitMQInvoker rabbitMQInvoker, IConfiguration configuration, ElasticSearchInvoker elasticSearchInvoker, IOptionsMonitor<ElasticSearchOptions> optionsMonitor)
{
this._logger = logger;
this._RabbitMQInvoker = rabbitMQInvoker;
this._configuration = configuration;
this._elasticSearchInvoker = elasticSearchInvoker;
this._ElasticSearchOptions = optionsMonitor;
this._searchService=searchService;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
@@ -48,14 +47,14 @@ namespace Yi.Framework.ElasticSearchProcessor
HttpClient _HttpClient = new HttpClient();
this._RabbitMQInvoker.RegistReciveAction(rabbitMQConsumerModel, message =>
{
SKUWarmupQueueModel skuWarmupQueueModel = JsonConvert.DeserializeObject<SKUWarmupQueueModel>(message);
//SKUWarmupQueueModel skuWarmupQueueModel = JsonConvert.DeserializeObject<SKUWarmupQueueModel>(message);
//【得到消息队列模型】
#region Index---Index---
{
try
{
this._elasticSearchInvoker.DropIndex(this._ElasticSearchOptions.CurrentValue.IndexName);
this._searchService.ImpDataBySpu();
//this._searchService.ImpDataBySpu();
//【触发es数据导入服务】
this._logger.LogInformation($"{nameof(WarmupESIndexWorker)}.InitAll succeed");
return true;