anchor.diff:    NewState :: term().
   %% ====================================================================
   check_cluster_state(State) ->
  -  CheckNum = (State#cm_state.cluster_check_num + 1) rem 15,
  +  CheckNum = (State#cm_state.cluster_check_num + 1) rem 1,
   
     NewState = case CheckNum of
                  0 ->
                    case length(State#cm_state.nodes) > 1 of
                      true ->
                        {NodesLoad, AvgLoad} = calculate_node_load(State#cm_state.nodes, long),
  -                     WorkersLoad = calculate_worker_load(State#cm_state.workers),
  +
  +                     WorkersLoad = [{Worker, [{Module, Load} || {Module, Load} <- LoadList, not lists:member(Module, ?PERMAMENT_MODULES)]} || {Worker, LoadList} <- calculate_worker_load(State#cm_state.workers)],
  +
  +                     ?info("WorkersLoad ~p", [WorkersLoad]),
  +
                        Load = calculate_load(NodesLoad, WorkersLoad),
   
                        MinV = case [NodeLoad || {_Node, NodeLoad, _ModulesLoads} <- Load, NodeLoad =/= error] of
  
positive.code:       State
    end.
  
  %% init_cluster_nodes_dominance/6
  %% ====================================================================
  %% @doc Chooses node for workers when there are more nodes than workers.
  
negative.code:       end
    end;
  
  handle_cast(register_default_module_listeners, State) ->
    ?info("Registering modle lifecycle listeners."),
    add_module_lifecycle_listener(rtransfer, {module, rule_manager}),
    add_module_lifecycle_listener(rtransfer, {module, gateway}),
    add_module_lifecycle_listener(gateway, {all_modules}),
    add_module_lifecycle_listener(rule_manager, {node, gateway, "w2@veildev_132.local"}),
    add_module_lifecycle_listener(central_logger, {module, gateway, "w2@veildev_132.local"}),
    add_module_lifecycle_listener(central_logger, {all_modules}),
    {noreply, State};
  
  handle_cast(init_cluster, State) ->
    NewState = init_cluster(State),
    {noreply, NewState};
  