김민성 수석님. 구매 관련 수정
This commit is contained in:
		| @@ -17,49 +17,49 @@ namespace Project | ||||
|         { | ||||
|             while (bBW) | ||||
|             { | ||||
|                 if (redisConnection == null) | ||||
|                 { | ||||
|                     var ts = DateTime.Now - redisTryTime; | ||||
|                     if (ts.TotalMinutes > 5) | ||||
|                     { | ||||
|                         Console.WriteLine("redis conn : 10.131.36.57:6379"); | ||||
|                         try | ||||
|                         { | ||||
|                             redisConnection = StackExchange.Redis.ConnectionMultiplexer.Connect("10.131.36.57:6379"); | ||||
|                         } | ||||
|                         catch (Exception ex) | ||||
|                         { | ||||
|                 //if (redisConnection == null) | ||||
|                 //{ | ||||
|                 //    var ts = DateTime.Now - redisTryTime; | ||||
|                 //    if (ts.TotalMinutes > 5) | ||||
|                 //    { | ||||
|                 //        Console.WriteLine("redis conn : 10.131.36.57:6379"); | ||||
|                 //        try | ||||
|                 //        { | ||||
|                 //            redisConnection = StackExchange.Redis.ConnectionMultiplexer.Connect("10.131.36.57:6379"); | ||||
|                 //        } | ||||
|                 //        catch (Exception ex) | ||||
|                 //        { | ||||
|  | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     if (redisConnection.IsConnected) | ||||
|                     { | ||||
|                         if (this.db == null) | ||||
|                         { | ||||
|                             try | ||||
|                             { | ||||
|                                 Console.WriteLine("redis connected setting db"); | ||||
|                                 this.db = redisConnection.GetDatabase(); | ||||
|                                 var getStr = this.db.StringGet("test"); | ||||
|                                 Console.WriteLine(getStr); | ||||
|                             } | ||||
|                             catch (Exception ex) | ||||
|                             { | ||||
|                                 Pub.log.AddE("REDIS " + ex.Message); | ||||
|                             } | ||||
|                 //        } | ||||
|                 //    } | ||||
|                 //} | ||||
|                 //else | ||||
|                 //{ | ||||
|                 //    if (redisConnection.IsConnected) | ||||
|                 //    { | ||||
|                 //        if (this.db == null) | ||||
|                 //        { | ||||
|                 //            try | ||||
|                 //            { | ||||
|                 //                Console.WriteLine("redis connected setting db"); | ||||
|                 //                this.db = redisConnection.GetDatabase(); | ||||
|                 //                var getStr = this.db.StringGet("test"); | ||||
|                 //                Console.WriteLine(getStr); | ||||
|                 //            } | ||||
|                 //            catch (Exception ex) | ||||
|                 //            { | ||||
|                 //                Pub.log.AddE("REDIS " + ex.Message); | ||||
|                 //            } | ||||
|  | ||||
|                         } | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         Console.WriteLine("resetting redis connection"); | ||||
|                         redisConnection.Dispose(); | ||||
|                         redisConnection = null; | ||||
|                     } | ||||
|                 } | ||||
|                 //        } | ||||
|                 //    } | ||||
|                 //    else | ||||
|                 //    { | ||||
|                 //        Console.WriteLine("resetting redis connection"); | ||||
|                 //        redisConnection.Dispose(); | ||||
|                 //        redisConnection = null; | ||||
|                 //    } | ||||
|                 //} | ||||
|  | ||||
|  | ||||
|                 System.Threading.Thread.Sleep(5000); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 chi
					chi