diff options
Diffstat (limited to 'src/frontend.erl')
-rw-r--r-- | src/frontend.erl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/frontend.erl b/src/frontend.erl index b7fa4b1..1055e5f 100644 --- a/src/frontend.erl +++ b/src/frontend.erl @@ -241,16 +241,17 @@ check_entries_int(Entries, Start, End) -> end, [], lists:zip(Entries, lists:seq(Start, End))). check_entries_noreverse(Entries, Start, End) -> - lists:foldl(fun ({Hash, Index}, Acc) -> - lager:info("checking entry ~p", [Index]), - case check_entry_noreverse(Hash, Index) of + Results = util:parallel_map(fun ({Hash, Index}) -> + check_entry_noreverse(Hash, Index) + end, lists:zip(Entries, lists:seq(Start, End)), 2), + lists:foldl(fun (Result, Acc) -> + case Result of ok -> - lager:info("entry ~p is correct", [Index]), Acc; Error -> [Error | Acc] end - end, [], lists:zip(Entries, lists:seq(Start, End))). + end, [], Results). entryhash_from_entry(Entry) -> {ok, {Module, Function}} = application:get_env(plop, entryhash_from_entry), |