admin 2 éve
szülő
commit
818b4c76a8

+ 7 - 2
src/CallCenter.Application/Handlers/FlowControl/ByeExtAndOuterOneNotificationHandler.cs

@@ -1,9 +1,11 @@
-using CallCenter.Caches;
+using CacheManager.Core.Logging;
+using CallCenter.Caches;
 using CallCenter.Calls;
 using CallCenter.Notifications;
 using CallCenter.Realtimes;
 using CallCenter.Share.Enums;
 using MediatR;
+using Microsoft.Extensions.Logging;
 
 namespace CallCenter.Application.Handlers
 {
@@ -13,13 +15,15 @@ namespace CallCenter.Application.Handlers
         private readonly ICallDetailRepository _callDetailRepository;
         private readonly IUserCacheManager _userCacheManager;
         private readonly IRealtimeService _realtimeService;
+        private readonly ILogger<ByeExtAndOuterOneNotificationHandler> _logger;
 
-        public ByeExtAndOuterOneNotificationHandler(ICallRepository callRepository, ICallDetailRepository callDetailRepository,IUserCacheManager userCacheManager, IRealtimeService realtimeService)
+        public ByeExtAndOuterOneNotificationHandler(ICallRepository callRepository, ICallDetailRepository callDetailRepository,IUserCacheManager userCacheManager, IRealtimeService realtimeService,ILogger<ByeExtAndOuterOneNotificationHandler> logger)
         {
             _callRepository = callRepository;
             _callDetailRepository = callDetailRepository;
             _userCacheManager = userCacheManager;
             _realtimeService = realtimeService;
+            _logger = logger;
         }
 
 
@@ -51,6 +55,7 @@ namespace CallCenter.Application.Handlers
                 var workModel = _userCacheManager.GetWorkByTel(notification.TelNo);
                 if (workModel != null)
                 {
+                    _logger.LogInformation("UserId:" + workModel.UserId + ",Id:" + model.Id);
                     await _realtimeService.ByeAsync(workModel.UserId, new ByeDto() { Id = model.Id }, cancellationToken);
                 }