pool: :media
]
+ defp adapter_options do
+ if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Hackney do
+ Keyword.put(@adapter_options, :recv_timeout, 10_000)
+ else
+ @adapter_options
+ end
+ end
+
def perform(:prefetch, url) do
# Fetching only proxiable resources
if MediaProxy.enabled?() and MediaProxy.url_proxiable?(url) do
end
end
- defp adapter_options do
- if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Hackney do
- Keyword.put(@adapter_options, :recv_timeout, 10_000)
- else
- @adapter_options
- end
- end
-
def perform(:preload, %{"object" => %{"attachment" => attachments}} = _message) do
Enum.each(attachments, fn
%{"url" => url} when is_list(url) ->