refactor(all server stats): added a 5 second time out if it dose not reach it just stops
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
vars {
|
||||
url: http://localhost:5500
|
||||
url: https://usbet1prod.alpla.net
|
||||
session_cookie:
|
||||
urlv2: http://localhost:3000
|
||||
jwtV2:
|
||||
|
||||
@@ -66,7 +66,9 @@ router.get("/", async (req, res) => {
|
||||
} else {
|
||||
url = `https://${sInfo[i].plantToken}prod.alpla.net/lst/api/system/stats`;
|
||||
}
|
||||
const { data: prodServerInfo } = await axios.get(url);
|
||||
const { data: prodServerInfo } = await axios.get(url, {
|
||||
timeout: 5 * 60 * 1000,
|
||||
});
|
||||
|
||||
// console.log(
|
||||
// `${sInfo[i].plantToken}, data ${JSON.stringify(prodServerInfo)}`,
|
||||
|
||||
Reference in New Issue
Block a user