diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-04-19 14:44:39 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-04-19 14:44:39 +0200 |
commit | 5aee70243909bfb14772f3c24ccc707e6ce47ea1 (patch) | |
tree | 5b79a758f5eafd71f8b82a1dce79481e6b5c0b07 /server/sonar-web/src/main/js/api/system.js | |
parent | f8d64d2b0e547f0bffdda47b02e46d200cf04729 (diff) | |
download | sonarqube-5aee70243909bfb14772f3c24ccc707e6ce47ea1.tar.gz sonarqube-5aee70243909bfb14772f3c24ccc707e6ce47ea1.zip |
check system status when restarting server
Diffstat (limited to 'server/sonar-web/src/main/js/api/system.js')
-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); } |