wanshenmean
2026-03-27 dcbd4934d063f471c01cbcf93574c2e2ac5f16b5
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_RedisService/Connection/RedisConnectionManager.cs
@@ -3,6 +3,7 @@
using StackExchange.Redis;
using System.Linq;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.LogHelper;
using WIDESEAWCS_RedisService.Options;
namespace WIDESEAWCS_RedisService.Connection
@@ -59,16 +60,16 @@
                var connection = ConnectionMultiplexer.Connect(configOptions);
                connection.ConnectionFailed += (_, e) =>
                    ConsoleHelper.WriteErrorLine($"Redis连接失败: {e.FailureType}");
                    QuartzLogger.Info($"Redis连接失败: {e.FailureType}");
                connection.ConnectionRestored += (_, e) =>
                    ConsoleHelper.WriteSuccessLine($"Redis连接恢复: {e.EndPoint}");
                    QuartzLogger.Info($"Redis连接恢复: {e.EndPoint}");
                ConsoleHelper.WriteSuccessLine($"Redis连接成功: {string.Join(",", configOptions.EndPoints)}");
                QuartzLogger.Info($"Redis连接成功: {string.Join(",", configOptions.EndPoints)}");
                return connection;
            }
            catch (Exception ex)
            {
                ConsoleHelper.WriteErrorLine($"Redis连接创建失败:{ex.Message}");
                QuartzLogger.Error($"Redis连接创建失败:{ex.Message}",null, ex);
                throw;
            }
        }