Merge branch 'update-rqbbitmq' into dev
This commit is contained in:
@@ -35,19 +35,16 @@ namespace PARR.TemplateGeneratorWorker
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
var isConnected = mqService.InitConsumer(mqSettings, GenerateTemplateAsync);
|
||||
var isConnected = await mqService.InitConsumerAsync(mqSettings, GenerateTemplateAsync);
|
||||
|
||||
if (!isConnected)
|
||||
throw new Exception("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> RabbitMq");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
mqService.Dispose();
|
||||
mqService.DisposeAsync().AsTask().Wait();
|
||||
|
||||
return base.StopAsync(cancellationToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user