From af29fb21df63a562d2d840623c4d2012c99ca410 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Sun, 21 May 2017 11:33:16 +0300 Subject: [PATCH] Get rid of detection of modules' db_type detection The detection sometimes leads to errorneous warnings. We need to improve it later. For now I just remove the detection as it doesn't fully work anyway. --- src/ejabberd_redis_sup.erl | 8 +------- src/ejabberd_riak_sup.erl | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/ejabberd_redis_sup.erl b/src/ejabberd_redis_sup.erl index 39b7ef798..9b3cc11bb 100644 --- a/src/ejabberd_redis_sup.erl +++ b/src/ejabberd_redis_sup.erl @@ -108,17 +108,11 @@ is_redis_configured(Host) -> PoolSize = ejabberd_config:has_option({redis_pool_size, Host}), ConnTimeoutConfigured = ejabberd_config:has_option( {redis_connect_timeout, Host}), - Modules = ejabberd_config:get_option({modules, Host}, []), SMConfigured = ejabberd_config:get_option({sm_db_type, Host}) == redis, RouterConfigured = ejabberd_config:get_option({router_db_type, Host}) == redis, - ModuleWithRedisDBConfigured = - lists:any( - fun({Module, Opts}) -> - gen_mod:db_type(Host, Opts, Module) == redis - end, Modules), ServerConfigured or PortConfigured or DBConfigured or PassConfigured or PoolSize or ConnTimeoutConfigured or - SMConfigured or RouterConfigured or ModuleWithRedisDBConfigured. + SMConfigured or RouterConfigured. get_specs() -> lists:map( diff --git a/src/ejabberd_riak_sup.erl b/src/ejabberd_riak_sup.erl index 30be65c4f..67b50ea6a 100644 --- a/src/ejabberd_riak_sup.erl +++ b/src/ejabberd_riak_sup.erl @@ -89,16 +89,11 @@ is_riak_configured(Host) -> ejabberd_auth:auth_modules(Host)), SMConfigured = ejabberd_config:get_option({sm_db_type, Host}) == riak, RouterConfigured = ejabberd_config:get_option({router_db_type, Host}) == riak, - Modules = ejabberd_config:get_option({modules, Host}, []), - ModuleWithRiakDBConfigured = lists:any( - fun({Module, Opts}) -> - gen_mod:db_type(Host, Opts, Module) == riak - end, Modules), ServerConfigured or PortConfigured or StartIntervalConfigured or PoolConfigured or CacertConfigured or UserConfigured or PassConfigured or SMConfigured or RouterConfigured - or AuthConfigured or ModuleWithRiakDBConfigured. + or AuthConfigured. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).