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.
|
- using HealthMonitor.Service.Resolver.Interface;
- using HealthMonitor.Service.Sub;
- using HealthMonitor.Service.Sub.Interface;
- using System.Collections.Concurrent;
-
- namespace HealthMonitor.WebApi
- {
- public class PackageProcess : IDisposable
- {
- private readonly ILogger<PackageProcess> _logger;
-
- private readonly MsgQueueManager _msgQueueManager;
-
- public PackageProcess(ILogger<PackageProcess> logger, MsgQueueManager msgQueueManager)
- {
- _logger = logger;
-
- _msgQueueManager = msgQueueManager;
- }
-
- public async Task<bool> ResolveAsync()
- {
- var resolver = _msgQueueManager.GetMsgResolver();
-
- try
- {
-
- if (resolver != null)
- {
- await resolver.ExecuteMessageAsync().ConfigureAwait(false);
- }
-
- }
- catch (Exception ex)
- {
- _logger.LogError($"未处理异常 message: {ex.Message}\n {ex.StackTrace}");
- }
-
- return true;
-
- }
-
- public void Dispose()
- {
- throw new NotImplementedException();
- }
- }
- }
|