From 392708bad9491c93ac79177ba2d98ed35c4aab9b Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 25 Oct 2025 18:12:15 +1100 Subject: [PATCH] reformat --- internal/js/jobs.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/internal/js/jobs.js b/internal/js/jobs.js index d5a2347..1b4476a 100644 --- a/internal/js/jobs.js +++ b/internal/js/jobs.js @@ -71,16 +71,15 @@ function SetActiveJobsBadge(num_jobs) // after a 1 second timeout function CheckForJobs() { - $.ajax( - { - type: 'POST', url: '/check_for_jobs', - success: function(data) { - // for each status, handle it/make toast in UI - data.sts.forEach( function(el) { StatusMsg(el) } ) - SetActiveJobsBadge(data.num_active_jobs) - // still active job(s), keep checking for them to end - if( data.num_active_jobs > 0 ) { setTimeout( function() { CheckForJobs() }, 1000 ); } - }, - } ) + $.ajax( { + type: 'POST', url: '/check_for_jobs', + success: function(data) { + // for each status, handle it/make toast in UI + data.sts.forEach( function(el) { StatusMsg(el) } ) + SetActiveJobsBadge(data.num_active_jobs) + // still active job(s), keep checking for them to end + if( data.num_active_jobs > 0 ) { setTimeout( function() { CheckForJobs() }, 1000 ); } + }, + } ) return false; }