code formatting
This commit is contained in:
@@ -75,17 +75,11 @@ function CheckForJobs()
|
|||||||
{
|
{
|
||||||
type: 'POST', url: '/check_for_jobs',
|
type: 'POST', url: '/check_for_jobs',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
data.sts.forEach(
|
// for each status, handle it/make toast in UI
|
||||||
function(el)
|
data.sts.forEach( function(el) { StatusMsg(el) } )
|
||||||
{
|
|
||||||
StatusMsg(el)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
SetActiveJobsBadge(data.num_active_jobs)
|
SetActiveJobsBadge(data.num_active_jobs)
|
||||||
if( data.num_active_jobs > 0 )
|
// still active job(s), keep checking for them to end
|
||||||
{
|
if( data.num_active_jobs > 0 ) { setTimeout( function() { CheckForJobs() }, 1000 ); }
|
||||||
setTimeout( function() { CheckForJobs() }, 1000 );
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
} )
|
} )
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user