File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ def insert_callback(
261
261
"output" : output ,
262
262
"raw_inputs" : inputs ,
263
263
"manager" : manager ,
264
+ "allow_dynamic_callbacks" : dynamic_creator ,
264
265
}
265
266
callback_list .append (callback_spec )
266
267
Original file line number Diff line number Diff line change @@ -1285,7 +1285,6 @@ def long_callback(
1285
1285
def dispatch (self ):
1286
1286
body = flask .request .get_json ()
1287
1287
1288
- app_studio = "app_studio" in ComponentRegistry .registry
1289
1288
nlibs = len (ComponentRegistry .registry )
1290
1289
1291
1290
g = AttributeDict ({})
@@ -1317,6 +1316,7 @@ def dispatch(self):
1317
1316
1318
1317
try :
1319
1318
cb = self .callback_map [output ]
1319
+ _allow_dynamic = cb .get ("allow_dynamic_callbacks" , False )
1320
1320
func = cb ["callback" ]
1321
1321
g .background_callback_manager = (
1322
1322
cb .get ("manager" ) or self ._background_manager
@@ -1383,7 +1383,7 @@ def dispatch(self):
1383
1383
)
1384
1384
)
1385
1385
1386
- if not app_studio and nlibs != len (ComponentRegistry .registry ):
1386
+ if not _allow_dynamic and nlibs != len (ComponentRegistry .registry ):
1387
1387
print (
1388
1388
"Warning: component library imported during callback, move to top-level for full support." ,
1389
1389
file = sys .stderr ,
You can’t perform that action at this time.
0 commit comments