1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-22 14:08:15 +00:00

Revert "very basic mvp for shedding load"

This commit is contained in:
Jakob Ackermann 2021-07-01 11:57:03 +01:00 committed by GitHub
parent d22bb95ab3
commit b62b96cb1c

View file

@ -331,7 +331,7 @@ const loadTcpServer = net.createServer(function (socket) {
const freeLoad = availableWorkingCpus - currentLoad
let freeLoadPercentage = Math.round((freeLoad / availableWorkingCpus) * 100)
if (freeLoadPercentage <= 0) {
freeLoadPercentage = 0 // when its 0 the server is set to drain and will move projects to different servers
freeLoadPercentage = 1 // when its 0 the server is set to drain and will move projects to different servers
}
socket.write(`up, ${freeLoadPercentage}%\n`, 'ASCII')
return socket.end()