Conditions | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | require "faraday/middleware" |
||
14 | def call(env) |
||
15 | original_env = env.dup |
||
16 | response = @app.call env |
||
17 | |||
18 | retry_status = @retry_util.retry_status response.env[:status], response.env[:response_headers][:retry_after] |
||
19 | |||
20 | if retry_status |
||
21 | @app.call original_env |
||
22 | else |
||
23 | response |
||
24 | end |
||
25 | end |
||
26 | end |
||
63 |