mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Add a metric so that we can know maint is prevented
GitOrigin-RevId: a4df6ce7f22df01e1116ae9dbf5c7c7afc73c388
This commit is contained in:
@@ -309,6 +309,10 @@ const loadTcpServer = net.createServer(function (socket) {
|
||||
} else {
|
||||
// Ready will cancel the maint state.
|
||||
socket.write(`up, ready, ${Math.max(freeLoadPercentage, 1)}%\n`, 'ASCII')
|
||||
if (freeLoadPercentage <= 0) {
|
||||
// This metric records how often we would have gone into maintenance mode.
|
||||
Metrics.inc('clsi-prevented-maint')
|
||||
}
|
||||
}
|
||||
socket.end()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user