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 {
|
vars {
|
||||||
url: http://localhost:5500
|
url: https://usbet1prod.alpla.net
|
||||||
session_cookie:
|
session_cookie:
|
||||||
urlv2: http://localhost:3000
|
urlv2: http://localhost:3000
|
||||||
jwtV2:
|
jwtV2:
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ router.get("/", async (req, res) => {
|
|||||||
} else {
|
} else {
|
||||||
url = `https://${sInfo[i].plantToken}prod.alpla.net/lst/api/system/stats`;
|
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(
|
// console.log(
|
||||||
// `${sInfo[i].plantToken}, data ${JSON.stringify(prodServerInfo)}`,
|
// `${sInfo[i].plantToken}, data ${JSON.stringify(prodServerInfo)}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user