anchor.diff:  -include("mf.hrl").
   
   -export([start/0, read/1, sync_db/0, sync_query/2]).
  +
  +-define(DEF_NUM_OF_ITEMS, 20).
  +-define(DEF_SYNC_FEEDS, 120*60*1000).
   
   %%------------------------------------------------------------------------------
   %% @spec start() -> {ok, AggregatorPid} | {error, Reason}
  
positive.code:     {atomic, Val} = mnesia:transaction(F),
      %% sync feeds in db
      lists:map(fun(Feed) ->
                        sync_feed(Feed) end,
                Val).
  
  %% sync local and remote feeds
  
negative.code:         {From, {stop}} ->
              From ! {ok, self()},
              {ok}
      %% sync aggregator db periodically
      after ?DEF_SYNC_FEEDS ->
              sync_db(),
              loop()
      end.
  