You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3f629c2 refactor: [#473] tracker API client. Remove duplicate code (Jose Celano)
7256b46 feat: [#473] add timeout to Tracker API Client requests (Jose Celano)
Pull request description:
Ass default timeout of 5 seconds for Tracker API requests.
In the future, we could use the official Tracker API client. See torrust/torrust-tracker#689.
However, it's also fine to use this reduced client. Because we do not need all the PAI endpoints.
ACKs for top commit:
josecelano:
ACK 3f629c2
Tree-SHA512: fc22ceac6ef234fb1bd20b6ae5099cea17ddfe2cb599faa3ad6f3e2ae04d93043e6af0b9a85dc41785f0a99bf7ace13f8e5e0cb656058390bf20585b236bf5e6
We are using a Tracker API Client in test code.
See: https://github.com/torrust/torrust-tracker/blob/develop/tests/servers/api/v1/client.rs
That client is duplicated in the Index because the Index calls the Tracker API:
https://github.com/torrust/torrust-index/blob/develop/src/tracker/api.rs
We should extract that login into an independent package so that the Index can use it and we remove that duplicate code.
Before extracting the package we should clean it and make it ready for production. Currently, is not ready because
http://
.request
errors or we wrap them.I propose to create this packages:
packages/api-types
(torrust-tracker-api-types
)packages/api-client
(torrust-tracker-api-client
) <- depends ontorrust-tracker-api-types
packages/api-server
(torrust-tracker-api-server
) <- depends ontorrust-tracker-api-types
. Maybe in the futureRelates to: #255 (comment)
The text was updated successfully, but these errors were encountered: