Closed Benjou02 closed 2 years ago
This route checks the number of gateways that are up but not in a call, and if all gateways have ended their calls, meaning the host can be deleted.
Do not forget: since the gateway container takes 5sec to be deleted after the end of a call, the metrics are not accurate during these 5sec.
Added a GET route in the web.py server:
GET
web.py
readyToCall
callsEnded
This code was tested on a machine with 3 gateways being used one after the other.
Short description
This route checks the number of gateways that are up but not in a call, and if all gateways have ended their calls, meaning the host can be deleted.
Do not forget: since the gateway container takes 5sec to be deleted after the end of a call, the metrics are not accurate during these 5sec.
Changes
Added a
GET
route in theweb.py
server:readyToCall
is the number of gateway containers that are up but not in a callcallsEnded
is a boolean telling if all gateways have been usedTests
This code was tested on a machine with 3 gateways being used one after the other.