1
0
Fork 1
mirror of https://gitlab.com/mangadex-pub/mangadex_at_home.git synced 2024-01-19 02:48:37 +00:00

Merge branch 'feature/expose-network-speed' into 'master'

Added additional entry to server ping for network speed

See merge request mangadex/mangadex_at_home!21
This commit is contained in:
Amos Ng 2020-06-13 21:39:33 +00:00
commit 36afce1a1b
2 changed files with 2 additions and 0 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [2020-06-13] Added X-Cache header to image responses by [@lflare]. - [2020-06-13] Added X-Cache header to image responses by [@lflare].
- [2020-06-13] Added .gitattributes to help sort out CHANGELOG.md merge conflicts by [@lflare]. - [2020-06-13] Added .gitattributes to help sort out CHANGELOG.md merge conflicts by [@lflare].
- [2020-06-13] Added rudimentary web-ui by [@carbotaniuman & @RedMatriz]. - [2020-06-13] Added rudimentary web-ui by [@carbotaniuman & @RedMatriz].
- [2020-06-13] Added additional entry to server ping for network speed by [@lflare].
### Changed ### Changed
- [2020-06-13] Modified AsyncAppender queue size to 1024 by [@lflare]. - [2020-06-13] Modified AsyncAppender queue size to 1024 by [@lflare].

View file

@ -42,6 +42,7 @@ public class ServerHandler {
params.put("secret", settings.getClientSecret()); params.put("secret", settings.getClientSecret());
params.put("port", settings.getClientPort()); params.put("port", settings.getClientPort());
params.put("disk_space", settings.getMaxCacheSizeMib() * 1024 * 1024 /* MiB to bytes */); params.put("disk_space", settings.getMaxCacheSizeMib() * 1024 * 1024 /* MiB to bytes */);
params.put("network_speed", settings.getMaxBurstRateKibPerSecond() * 1024 /*KiB to bytes */);
params.put("build_version", Constants.CLIENT_BUILD); params.put("build_version", Constants.CLIENT_BUILD);
HttpResponse<ServerSettings> response = Unirest.post(SERVER_ADDRESS + "ping") HttpResponse<ServerSettings> response = Unirest.post(SERVER_ADDRESS + "ping")