Skip to content

Commit

Permalink
Make the hard-coded value private-const
Browse files Browse the repository at this point in the history
  • Loading branch information
mocchira committed Jan 16, 2018
1 parent 4e42a3a commit f2a565c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/leo_object_storage_api.erl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
-endif.

-define(SERVER_MODULE, 'leo_object_storage_server').
-define(FETCH_BY_KEY_INTERVAL_TO_COMMUNICATE_WITH_PARENT, 5). %% Communicate with a parent process per 5 messages

%%--------------------------------------------------------------------
%% API
Expand Down Expand Up @@ -376,7 +377,7 @@ fetcher_loop(ServerId, Key, Fun, MaxKeys, ReceiverPid) ->
end,
NewCounter = Counter + 1,
erlang:put(counter, NewCounter),
case NewCounter rem 5 of
case NewCounter rem ?FETCH_BY_KEY_INTERVAL_TO_COMMUNICATE_WITH_PARENT of
0 ->
ReceiverPid ! {counter, self(), NewCounter},
receive
Expand Down

0 comments on commit f2a565c

Please sign in to comment.