anchor.diff:  push(Name, #shard{node=Node}) ->
       push(Name, Node);
   push(Name, Node) ->
  -    gen_server:cast(?MODULE, {push, Name, Node}).
  +    push(#job{name = Name, node = Node}).
  +
  +push(Job) ->
  +    gen_server:cast(?MODULE, {push, Job}).
   
   remove_node(Node) ->
       gen_server:cast(?MODULE, {remove_node, Node}).
  
positive.code:         twig:log(debug, "adding ~s -> ~p to mem3_sync queue", [DbName, Node]),
          State#state{
              dict = dict:store({DbName,Node}, ok, D),
              waiting = Waiting ++ [{DbName,Node}]
          }
      end.
  
  
negative.code: %% which does not correspond to an already running replication
  -spec next_replication(list(), list()) -> {binary(),node(),list()} | nil.
  next_replication(Active, Waiting) ->
      Fun = fun(#job{name=S, node=N}) -> is_running(S,N,Active) end,
      case lists:splitwith(Fun, Waiting) of
      {_, []} ->
          nil;
      {Running, [Job|Rest]} ->
          {Job, Running ++ Rest}
      end.
  
  is_running(DbName, Node, ActiveList) ->
      [] =/= [true || #job{name=S, node=N} <- ActiveList, S=:=DbName, N=:=Node].
  
  remove_entries(Dict, Entries) ->
      lists:foldl(fun(Entry, D) -> dict:erase(Entry, D) end, Dict, Entries).
  