anchor.diff:  -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
            terminate/2, code_change/3]).
   
  --define(REFRESH_INTERVAL,
  -        ns_config:get_timeout(service_status_keeper_refresh, 5000)).
   -define(WORKER, service_status_keeper_worker).
  --define(STALE_THRESHOLD,
  -        ns_config:read_key_fast(service_status_keeper_stale_threshold, 2)).
  +
  +get_refresh_interval(Service) ->
  +    ns_config:get_timeout(
  +      {Service:get_type(), service_status_keeper_refresh},
  +      ns_config:get_timeout(index_status_keeper_refresh, 5000)).
  +
  +get_stale_threshold(Service) ->
  +    ns_config:read_key_fast(
  +      {Service:get_type(), service_status_keeper_stale_threshold},
  +      ns_config:read_key_fast(index_status_keeper_stale_threshold, 2)).
  +
  +dont_restart_service(Service) ->
  +    ns_config:read_key_fast(
  +      {Service:get_type(), dont_restart_service},
  +      ns_config:read_key_fast(dont_restart_indexer, false)).
   
   server_name(Service) ->
       list_to_atom(?MODULE_STRING "-" ++ atom_to_list(Service:get_type())).
  
positive.code:                 increment_stale(State)
          end,
  
      erlang:send_after(?REFRESH_INTERVAL, self(), refresh),
      {noreply, NewState};
  handle_cast(restart_done, #state{restart_pending = true} = State) ->
      {noreply, State#state{restart_pending = false}}.
  
negative.code: set_stale(Items, State) ->
      set_stale(State#state{items = Items}).
  
  increment_stale(#state{stale = StaleInfo,
                         service = Service} = State) ->
      case StaleInfo of
          true ->
              %% we're already stale; no need to do anything
  