reduce reqwest timeout to 5s #557

已合併
Plume_migration_agent 5 年之前 將 1 次代碼提交從 reduce-timeout 合併至 master
所有者

Current timeout is 30s, this add a second kind of timeout : if connection to remote can't be established in 5s, the remote is considered down, so that a thread don't stall for too long for no reason (and also make some unit test much faster to run)

Current timeout is 30s, this add a second kind of timeout : if connection to remote can't be established in 5s, the remote is considered down, so that a thread don't stall for too long for no reason (and also make some unit test much faster to run)
elegaanz (Migrated from github.com) approved these changes 5 年之前
elegaanz (Migrated from github.com) left a comment

It makes me think: couldn't we have a unique client (in a lazy_static! or something like that). I think reqwest keep connections for a certain time if the client is not dropped, and it probably caches DNS too.

Otherwise, it looks good to me, so if the CI is happy you can merge.

It makes me think: couldn't we have a unique client (in a `lazy_static!` or something like that). I think reqwest keep connections for a certain time if the client is not dropped, and it probably caches DNS too. Otherwise, it looks good to me, so if the CI is happy you can merge.
codecov[bot] " 評論 5 年之前" (Migrated from github.com)

Codecov Report

Merging #557 into master will increase coverage by 2.71%.
The diff coverage is 62.96%.

@@            Coverage Diff             @@
##           master     #557      +/-   ##
==========================================
+ Coverage   40.03%   42.75%   +2.71%     
==========================================
  Files          69       70       +1     
  Lines        8035     8846     +811     
==========================================
+ Hits         3217     3782     +565     
- Misses       4818     5064     +246
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/557?src=pr&el=h1) Report > Merging [#557](https://codecov.io/gh/Plume-org/Plume/pull/557?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/8f1ab3485e3f70072fa3bf276dab31c1c6bc50bd?src=pr&el=desc) will **increase** coverage by `2.71%`. > The diff coverage is `62.96%`. ```diff @@ Coverage Diff @@ ## master #557 +/- ## ========================================== + Coverage 40.03% 42.75% +2.71% ========================================== Files 69 70 +1 Lines 8035 8846 +811 ========================================== + Hits 3217 3782 +565 - Misses 4818 5064 +246 ```
發佈者
所有者

maybe not a unique client (if we have multiple request to do at the same time they will be queued), but we could probably make some kind of pool of clients. I'll keep the idea somewhere for when I have spare time to spend

maybe not a unique client (if we have multiple request to do at the same time they will be queued), but we could probably make some kind of pool of clients. I'll keep the idea somewhere for when I have spare time to spend

Reviewers

The pull request has been merged as 33a0c7dcd3.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b reduce-timeout master
git pull origin reduce-timeout

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff reduce-timeout
git push origin master
登入 才能加入這對話。
No reviewers
未選擇里程碑
No Assignees
2 參與者
訊息
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#557
Loading…
尚未有任何內容