Skip to content

Commit

Permalink
rabbitmq2.4 and now riak is the default db
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Redaelli committed Apr 8, 2011
1 parent 0088ec8 commit 1bd6160
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/ebot.app
Expand Up @@ -44,8 +44,8 @@
%% Remember also to set DB_BACKEND_MODULE in src/ebot.hrl

{db_hostname, "127.0.0.1"},
{db_port, 5984}, %% CouchDB
%% {db_port, 8087}, %% Riak
%% {db_port, 5984}, %% CouchDB
{db_port, 8087}, %% Riak

%% ---------------------------------------------------------
%% MQ
Expand Down
4 changes: 2 additions & 2 deletions src/ebot.hrl
Expand Up @@ -24,8 +24,8 @@
%% -----------------------------------------------------------------------
%% DB
%% -----------------------------------------------------------------------
-define(EBOT_DB_BACKEND, ebot_db_backend_couchdb).
%-define(EBOT_DB_BACKEND, ebot_db_backend_riak_pb).
%-define(EBOT_DB_BACKEND, ebot_db_backend_couchdb).
-define(EBOT_DB_BACKEND, ebot_db_backend_riak_pb).

%% -----------------------------------------------------------------------
%% WEB
Expand Down
2 changes: 1 addition & 1 deletion src/ebot_html.erl
Expand Up @@ -240,7 +240,7 @@ analyze_url_body(Url, {_Status, _Headers, Body}) ->
Tokens = mochiweb_html:tokens(Body),
spawn(?MODULE, analyze_url_body_plugins, [Url, Tokens]),
error_logger:info_report({?MODULE, ?LINE, {analyze_body_plugins, Url}}),
Links = ebot_html_util:get_links_from_token(Tokens, Url),
Links = ebot_html_util:get_links_from_tokens(Tokens, Url),
analyze_url_body_links(Url, Links),
ebot_mq:send_url_processed({Url, empty}).

Expand Down
4 changes: 3 additions & 1 deletion src/ebot_html_analyzer_images.erl
Expand Up @@ -34,7 +34,9 @@
%%--------------------------------------------------------------------

add_images_list(Url, Tokens) ->
List = ebot_html_util:get_images_from_tokens(Tokens, Url),
%% List = ebot_html_util:get_images_from_tokens(Tokens, Url),
%% TODO
List = [],
%% Save Image urls to db and add them to the queue of urls to be visited
%% lists:foreach(fun ebot_db:open_or_create_url/1, List),
%% lists:foreach(fun ebot_crawler:add_url/1, List),
Expand Down
4 changes: 2 additions & 2 deletions sys.config
Expand Up @@ -31,9 +31,9 @@
%% in src/ebot.hrl file
{db_hostname, "127.0.0.1"},
%% COUCHDB
{db_port, 5984},
%%{db_port, 5984},
%% RIAK
%%{db_port, 8087},
{db_port, 8087},

%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MQ
Expand Down

0 comments on commit 1bd6160

Please sign in to comment.