anchor.diff:            erlang:send_after(StopTimeout, self(), stop)
         end,
         DBs1 = update_db(Resolution, DB1, DBs),
  -      {reply, {ok, self()}, W#worker{db_layers = DBs1, stop_timer = StopTimer, stop_timeout = StopTimeout}};
  -    {error, E} ->
  -      {stop, normal, {error, E}, W}
  -  end;
  -
  -
  -handle_call({read, Name, Query, Resolution}, _, #worker{db_layers = DBs} = W) ->
  -  DB = find_db(Resolution, DBs),
  -  {ok, Ticks, DB2} = pulsedb:read(Name, Query, DB),
  -  DBs1 = update_db(Resolution, DB2, DBs),
  -  {reply, {ok, Ticks, self()}, W#worker{db_layers = DBs1}};
  -
  -
  -handle_call({info, Resolution}, _, #worker{db_layers = DBs} = W) ->
  -  DB = find_db(Resolution, DBs),
  -  {reply, pulsedb:info(DB), W};
  -
  -
  -handle_call(sync, _, #worker{db_layers = DBs} = W) ->
  -  DBs1 = [begin
  -            {ok, DB1} = pulsedb:sync(DB),
  -            {Res, DB1} 
  -            end || {Res, DB} <- DBs],
  -  {reply, {ok, self()}, W#worker{db_layers = DBs1}};
  -
  -
  -handle_call(stop, _, #worker{} = W) ->
  -  {stop, normal, ok, W}.
  +      {noreply, W#worker{db_layers = DBs1, stop_timer = StopTimer}};
  +    {error, _E} ->
  +      {stop, normal, W}
  +  end;
   
   
   
  
positive.code: 
  
  append(Ticks, DB) when is_pid(DB) ->
    gen_server:call(DB, {append, Ticks, seconds});
  
  append(Ticks, DB) when is_atom(DB) ->
    case whereis(DB) of
  
negative.code:   end.
        
  
  handle_call({append, Ticks, Resolution}, _, #worker{} = W) ->
    {noreply, W1} = handle_info({append, Ticks, Resolution}, W),
    {reply, {ok, self()}, W1};
  
  
  handle_call({read, Name, Query, Resolution}, _, #worker{db_layers = DBs} = W) ->
    DB = find_db(Resolution, DBs),
    {ok, Ticks, DB2} = pulsedb:read(Name, Query, DB),
    DBs1 = update_db(Resolution, DB2, DBs),
    {reply, {ok, Ticks, self()}, W#worker{db_layers = DBs1}};
  
  
  handle_call({info, Resolution}, _, #worker{db_layers = DBs} = W) ->
    DB = find_db(Resolution, DBs),
    {reply, pulsedb:info(DB), W};
  
  
  handle_call(sync, _, #worker{db_layers = DBs} = W) ->
    DBs1 = [begin
              {ok, DB1} = pulsedb:sync(DB),
              {Res, DB1} 
              end || {Res, DB} <- DBs],
    {reply, {ok, self()}, W#worker{db_layers = DBs1}};
  
  
  handle_call(stop, _, #worker{} = W) ->
    {stop, normal, ok, W}.
  
  
  
  
  
  handle_info({append, Ticks, Resolution}, #worker{db_layers = DBs, stop_timeout = StopTimeout, stop_timer = OldTimer} = W) ->
    DB = find_db(Resolution, DBs),
    case pulsedb:append(Ticks, DB) of
      {ok, DB1} ->
  