remote_users(activity)
|> Enum.each(fn(remote_user) ->
- Logger.debug(fn -> "sending salmon to #{remote_user.ap_id}" end)
- send_to_user(remote_user, feed, poster)
+ Task.start(fn ->
+ Logger.debug(fn -> "sending salmon to #{remote_user.ap_id}" end)
+ send_to_user(remote_user, feed, poster)
+ end)
end)
end
end
signature = sign(sub.secret || "", response)
Logger.debug(fn -> "Pushing to #{sub.callback}" end)
- @httpoison.post(sub.callback, response, [
- {"Content-Type", "application/atom+xml"},
- {"X-Hub-Signature", "sha1=#{signature}"}
- ])
+ Task.start(fn ->
+ @httpoison.post(sub.callback, response, [
+ {"Content-Type", "application/atom+xml"},
+ {"X-Hub-Signature", "sha1=#{signature}"}
+ ])
+ end)
end)
end