diff options
author | Jan Lehnardt <jan@apache.org> | 2018-11-09 10:42:36 +0100 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2018-11-09 14:51:33 +0100 |
commit | 8a1e54c907427307c74b05a1c92fdcd11537bbf3 (patch) | |
tree | f840cd5fd15c1a9de58396327c1cdff85b2e5e63 | |
parent | 73b32713c33be7ddc2e64ab1fd1be0f472f6d3e2 (diff) | |
download | couchdb-8a1e54c907427307c74b05a1c92fdcd11537bbf3.tar.gz |
feat: remove redundant string parsing
-rw-r--r-- | src/couch/src/couch_secondary_sup.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/couch/src/couch_secondary_sup.erl b/src/couch/src/couch_secondary_sup.erl index d78b5b15b..255c84980 100644 --- a/src/couch/src/couch_secondary_sup.erl +++ b/src/couch/src/couch_secondary_sup.erl @@ -27,27 +27,27 @@ init([]) -> dynamic} ], Daemons = [ - {"index_server", "{couch_index_server, start_link, []}"}, - {"query_servers", "{couch_proc_manager, start_link, []}"}, - {"vhosts", "{couch_httpd_vhost, start_link, []}"}, - {"httpd", "{couch_httpd, start_link, []}"}, - {"uuids", "{couch_uuids, start, []}"}, - {"auth_cache", "{couch_auth_cache, start_link, []}"}, - {"compaction_daemon", "{couch_compaction_daemon, start_link, []}"} + {index_server, {couch_index_server, start_link, []}}, + {query_servers, {couch_proc_manager, start_link, []}}, + {vhosts, {couch_httpd_vhost, start_link, []}}, + {httpd, {couch_httpd, start_link, []}}, + {uuids, {couch_uuids, start, []}}, + {auth_cache, {couch_auth_cache, start_link, []}}, + {compaction_daemon, {couch_compaction_daemon, start_link, []}} ], Children = SecondarySupervisors ++ [ begin - {ok, {Module, Fun, Args}} = couch_util:parse_term(SpecStr), + {Module, Fun, Args} = Spec, - {list_to_atom(Name), + {Name, {Module, Fun, Args}, permanent, brutal_kill, worker, [Module]} end - || {Name, SpecStr} - <- Daemons, SpecStr /= ""], + || {Name, Spec} + <- Daemons, Spec /= ""], {ok, {{one_for_one, 50, 3600}, couch_epi:register_service(couch_db_epi, Children)}}. |