import Ecto.Query
use Mix.Task
+ def run(["http", url]) do
+ start_pleroma()
+
+ Pleroma.HTTP.get(url)
+ |> IO.inspect()
+ end
+
def run(["home_timeline", nickname]) do
start_pleroma()
user = Repo.get_by!(User, nickname: nickname)
if is_map(response.body) and method != :head do
{:ok, response.status, response.headers, response.body}
else
- conn_pid = response.opts[:adapter][:conn]
- ConnectionPool.release_conn(conn_pid)
{:ok, response.status, response.headers}
end
else
@impl true
@spec stream_body(map()) ::
{:ok, binary(), map()} | {:error, atom() | String.t()} | :done | no_return()
- def stream_body(%{pid: pid, fin: true}) do
- ConnectionPool.release_conn(pid)
+ def stream_body(%{pid: _pid, fin: true}) do
:done
end
@impl true
@spec close(map) :: :ok | no_return()
- def close(%{pid: pid}) do
- ConnectionPool.release_conn(pid)
+ def close(%{pid: _pid}) do
end
defp check_adapter do