Conversation
Judis
reviewed
Apr 25, 2022
Judis
reviewed
Apr 26, 2022
| end | ||
|
|
||
| def run_step(module, state) when is_atom(module) do | ||
| apply(module, :run, [state, []]) |
Member
Author
There was a problem hiding this comment.
sure, what is wrong?
A step can be one of the following:
* a 1-arity function
* a `{module, function, args}` tuple - calls `apply(module, function, [state | args])`
* a `{module, options}` tuple - calls `module.run(state, options)`
* a `module` atom - calls `module.run(state, [])`
lib/http_client/steps.ex
Outdated
| ] ++ | ||
| maybe_steps(options[:auth], [{__MODULE__, :auth, [options[:auth]]}]) ++ | ||
| maybe_steps(options[:params], [{__MODULE__, :put_params, [options[:params]]}]) ++ | ||
| maybe_steps(options[:steps], [{__MODULE__, :run_steps, [options[:steps]]}]) |
Contributor
There was a problem hiding this comment.
May be we can reverse this operation and use [x|y] syntax?
Member
Author
There was a problem hiding this comment.
I've changed adding steps to request, can you look again?
lib/http_client/steps.ex
Outdated
| response_telemetry_step = {__MODULE__, :log_response_end, []} | ||
|
|
||
| retry = options[:retry] | ||
| retry = if retry == true, do: [], else: retry |
Member
Author
There was a problem hiding this comment.
we can set retry: true then it will be default case:
retry only in case of exceptions (HTTPoison.Error and Mint.Error e.g. are exceptions) or status code >= 500, for 3 times with 2 sec pause
02d00f9 to
9e8acbd
Compare
faeaa15 to
319b858
Compare
be2cb9a to
a58cc3b
Compare
cbf95f1 to
ad2f92d
Compare
161faf1 to
577799a
Compare
* Add exponent retry * Dynamically start Finch pool with the given proxy configs * Support multiple content-encoding headers * Add follow_redirects step
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.