@@ -78,11 +78,16 @@ public void updateOrderWeight(double weight) {
7878 * 모든 가중치 일괄 업데이트
7979 */
8080 public void updateAllWeights (double viewWeight , double likeWeight , double orderWeight ) {
81- redisTemplate .opsForHash ().put (WEIGHT_KEY , "view" , String .valueOf (viewWeight ));
82- redisTemplate .opsForHash ().put (WEIGHT_KEY , "like" , String .valueOf (likeWeight ));
83- redisTemplate .opsForHash ().put (WEIGHT_KEY , "order" , String .valueOf (orderWeight ));
84- log .info ("랭킹 가중치 일괄 업데이트: view={}, like={}, order={}" ,
85- viewWeight , likeWeight , orderWeight );
81+ try {
82+ redisTemplate .opsForHash ().put (WEIGHT_KEY , "view" , String .valueOf (viewWeight ));
83+ redisTemplate .opsForHash ().put (WEIGHT_KEY , "like" , String .valueOf (likeWeight ));
84+ redisTemplate .opsForHash ().put (WEIGHT_KEY , "order" , String .valueOf (orderWeight ));
85+ log .info ("랭킹 가중치 일괄 업데이트: view={}, like={}, order={}" ,
86+ viewWeight , likeWeight , orderWeight );
87+ } catch (Exception e ) {
88+ log .error ("랭킹 가중치 일괄 업데이트 실패: view={}, like={}, order={}, error={}" ,
89+ viewWeight , likeWeight , orderWeight , e .getMessage (), e );
90+ }
8691 }
8792
8893 /**
0 commit comments