diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-04-19 14:44:39 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-04-28 15:09:05 +0200 |
commit | 5759717e9581b2db0599d744842f28a83c14e373 (patch) | |
tree | b7304aa3fd3cb619bdc3567d9b1d5f948cb26054 /server | |
parent | 6bc82f9bd7b42ba07d227ad2dac1f4d9162af937 (diff) | |
download | sonarqube-5759717e9581b2db0599d744842f28a83c14e373.tar.gz sonarqube-5759717e9581b2db0599d744842f28a83c14e373.zip |
check system status when restarting server
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/api/system.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/api/system.js b/server/sonar-web/src/main/js/api/system.js index 25b52880f9b..a280b6f7b73 100644 --- a/server/sonar-web/src/main/js/api/system.js +++ b/server/sonar-web/src/main/js/api/system.js @@ -45,7 +45,13 @@ const POLLING_INTERVAL = 2000; function pollStatus (cb) { setTimeout(() => { getStatus() - .then(() => cb()) + .then(r => { + if (r.status === 'UP') { + cb(); + } else { + pollStatus(cb); + } + }) .catch(() => pollStatus(cb)); }, POLLING_INTERVAL); } |