Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
Fix compilation errors and use of macro
Browse files Browse the repository at this point in the history
A bit of confusion with HAS_ and HAVE_ led to me not noticing that the
dreyfus/hastings bits didn't compile.
  • Loading branch information
rnewson committed Feb 25, 2019
1 parent 390b919 commit 50682f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ken_server.erl
Expand Up @@ -309,15 +309,15 @@ update_ddoc_indexes(Name, #doc{}=Doc, State) ->
false ->
ok
end,
SearchUpdated = search_updated(Doc, Seq, State),
STUpdated = st_updated(Doc, Seq, State),
SearchUpdated = search_updated(Name, Doc, Seq, State),
STUpdated = st_updated(Name, Doc, Seq, State),
case {ViewUpdated, SearchUpdated, STUpdated} of
{ok, ok, ok} -> ok;
_ -> resubmit
end.

-ifdef(HAS_DREYFUS).
search_updated(Doc, Seq, State) ->
-ifdef(HAVE_DREYFUS).
search_updated(Name, Doc, Seq, State) ->
case should_update(Doc, <<"indexes">>) of true ->
try dreyfus_index:design_doc_to_indexes(Doc) of
SIndexes -> update_ddoc_search_indexes(Name, SIndexes, Seq, State)
Expand All @@ -332,8 +332,8 @@ search_updated(_Doc, _Seq, _State) ->
ok.
-endif.

-ifdef(HAS_HASTINGS).
st_updated(Doc, Seq, State) ->
-ifdef(HAVE_HASTINGS).
st_updated(Name, Doc, Seq, State) ->
case should_update(Doc, <<"st_indexes">>) of true ->
try
hastings_index:design_doc_to_indexes(Doc) of
Expand Down

0 comments on commit 50682f9

Please sign in to comment.