Skip to content

Commit

Permalink
add currentDcAllMeta bean in console checker mode (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
songyuyuyu authored Nov 20, 2023
1 parent c346720 commit 77647d1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
import com.ctrip.xpipe.redis.console.dao.ConfigDao;
import com.ctrip.xpipe.redis.console.dao.RedisDao;
import com.ctrip.xpipe.redis.console.healthcheck.meta.DcIgnoredConfigChangeListener;
import com.ctrip.xpipe.redis.console.resources.CheckerCurrentDcAllMeta;
import com.ctrip.xpipe.redis.console.resources.DefaultPersistenceCache;
import com.ctrip.xpipe.redis.console.service.ClusterService;
import com.ctrip.xpipe.redis.console.service.DcClusterShardService;
import com.ctrip.xpipe.redis.console.service.RedisInfoService;
import com.ctrip.xpipe.redis.console.service.impl.AlertEventService;
import com.ctrip.xpipe.redis.console.service.impl.DefaultRedisInfoService;
import com.ctrip.xpipe.redis.core.meta.CurrentDcAllMeta;
import com.ctrip.xpipe.redis.core.meta.MetaCache;
import com.ctrip.xpipe.spring.AbstractProfile;
import org.springframework.beans.factory.annotation.Qualifier;
Expand Down Expand Up @@ -88,6 +89,11 @@ public AllCheckerLeaderElector allCheckerLeaderElector(FoundationService foundat
return new AllCheckerLeaderElector(foundationService.getDataCenter());
}

@Bean
public CurrentDcAllMeta currentDcAllMeta() {
return new CheckerCurrentDcAllMeta();
}

@Bean
@Profile(AbstractProfile.PROFILE_NAME_PRODUCTION)
public GroupCheckerLeaderElector checkerLeaderElector(FoundationService foundationService) {
Expand Down

0 comments on commit 77647d1

Please sign in to comment.