- Add retry: false to VISP Client HTTP requests - Add retry: false to ReleaseChecker GitHub API requests - Remove unused Plug.Conn import from RemoteIpLogger - Remove unused default parameter from req_get/2 Results: - VISP sync test: 7007ms → 113ms (62x faster) - ReleaseChecker test: 7004ms → 17ms (402x faster) - UserResetPasswordLive test: 1495ms → 284ms (5x faster) Req's default retry behavior (1s, 2s, 4s exponential backoff) was causing 7-second delays for HTTP 500/503 error responses in tests. For these clients, immediate failure is preferred over retries.
13 lines
445 B
Elixir
13 lines
445 B
Elixir
defmodule ToweropsWeb.GraphQL.Resolvers.Helpers do
|
|
@moduledoc """
|
|
Shared helpers for GraphQL resolvers.
|
|
"""
|
|
|
|
import ToweropsWeb.Api.ErrorHelpers, only: [format_errors: 1]
|
|
|
|
@spec authentication_error() :: {:error, String.t()}
|
|
def authentication_error, do: {:error, "Authentication required"}
|
|
|
|
@spec format_changeset_errors(Ecto.Changeset.t()) :: String.t()
|
|
def format_changeset_errors(changeset), do: format_errors(changeset)
|
|
end
|