@@ -1357,32 +1357,32 @@ def callback(_triggers, user_store_data, user_callback_args):
1357
1357
progress = progress_value or {},
1358
1358
user_store_data = user_store_data ,
1359
1359
)
1360
- else :
1361
- # Check if there is a running calculation that can now
1362
- # be canceled
1363
- old_pending_key = user_store_data .get ("pending_key" , None )
1364
- if (
1365
- old_pending_key
1366
- and old_pending_key != pending_key
1367
- and callback_manager .job_running (pending_job )
1368
- ):
1369
- callback_manager .terminate_job (pending_job )
1370
1360
1371
- user_store_data ["pending_key" ] = pending_key
1372
- callback_manager .terminate_unhealthy_job (pending_job )
1373
- if not callback_manager .job_running (pending_job ):
1374
- user_store_data ["pending_job" ] = callback_manager .call_job_fn (
1375
- pending_key , background_fn , user_callback_args
1376
- )
1361
+ # Check if there is a running calculation that can now
1362
+ # be canceled
1363
+ old_pending_key = user_store_data .get ("pending_key" , None )
1364
+ if (
1365
+ old_pending_key
1366
+ and old_pending_key != pending_key
1367
+ and callback_manager .job_running (pending_job )
1368
+ ):
1369
+ callback_manager .terminate_job (pending_job )
1377
1370
1378
- return dict (
1379
- user_callback_output = map_grouping (lambda x : no_update , output ),
1380
- interval_disabled = False ,
1381
- in_progress = [val for (_ , val , _ ) in running ],
1382
- progress = clear_progress ,
1383
- user_store_data = user_store_data ,
1371
+ user_store_data ["pending_key" ] = pending_key
1372
+ callback_manager .terminate_unhealthy_job (pending_job )
1373
+ if not callback_manager .job_running (pending_job ):
1374
+ user_store_data ["pending_job" ] = callback_manager .call_job_fn (
1375
+ pending_key , background_fn , user_callback_args
1384
1376
)
1385
1377
1378
+ return dict (
1379
+ user_callback_output = map_grouping (lambda x : no_update , output ),
1380
+ interval_disabled = False ,
1381
+ in_progress = [val for (_ , val , _ ) in running ],
1382
+ progress = clear_progress ,
1383
+ user_store_data = user_store_data ,
1384
+ )
1385
+
1386
1386
return self .callback (
1387
1387
inputs = dict (
1388
1388
_triggers = dict (
0 commit comments