forked from potsda.mn/mobilizon
Use tasks to process refreshing elements
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
386dbbb3a6
commit
fa99c09c57
|
@ -114,7 +114,10 @@ defmodule Mobilizon.Federation.ActivityPub.Refresher do
|
|||
|
||||
Logger.debug(inspect(items))
|
||||
|
||||
Enum.each(items, &handling_element/1)
|
||||
items
|
||||
|> Enum.map(fn item -> Task.async(fn -> handling_element(item) end) end)
|
||||
|> Task.await_many()
|
||||
|
||||
Logger.debug("Finished processing a collection")
|
||||
:ok
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue