repo: when creating repos if we don't get JSON results, stop execution at refresh.
This commit is contained in:
parent
5a4b5401b5
commit
b44222de22
1 changed files with 10 additions and 10 deletions
|
|
@ -50,19 +50,19 @@
|
|||
if (resp.status == 200) {
|
||||
var jsonResponse = resp.responseJSON;
|
||||
|
||||
if (jsonResponse === undefined){
|
||||
setTimeout(function(){
|
||||
if (jsonResponse === undefined) {
|
||||
setTimeout(function () {
|
||||
// we might have a backend problem, try dashboard again
|
||||
window.location = "${h.url('summary_home', repo_name = c.repo)}";
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
if (skipCheck || jsonResponse.result === true) {
|
||||
// success, means go to dashboard
|
||||
window.location = "${h.url('summary_home', repo_name = c.repo)}";
|
||||
}, 3000);
|
||||
} else {
|
||||
// Schedule the next request when the current one's complete
|
||||
setTimeout(worker, 1000);
|
||||
if (skipCheck || jsonResponse.result === true) {
|
||||
// success, means go to dashboard
|
||||
window.location = "${h.url('summary_home', repo_name = c.repo)}";
|
||||
} else {
|
||||
// Schedule the next request when the current one's complete
|
||||
setTimeout(worker, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue