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(
261261 "output" : output ,
262262 "raw_inputs" : inputs ,
263263 "manager" : manager ,
264+ "allow_dynamic_callbacks" : dynamic_creator ,
264265 }
265266 callback_list .append (callback_spec )
266267
Original file line number Diff line number Diff line change @@ -1285,7 +1285,6 @@ def long_callback(
12851285 def dispatch (self ):
12861286 body = flask .request .get_json ()
12871287
1288- app_studio = "app_studio" in ComponentRegistry .registry
12891288 nlibs = len (ComponentRegistry .registry )
12901289
12911290 g = AttributeDict ({})
@@ -1317,6 +1316,7 @@ def dispatch(self):
13171316
13181317 try :
13191318 cb = self .callback_map [output ]
1319+ _allow_dynamic = cb .get ("allow_dynamic_callbacks" , False )
13201320 func = cb ["callback" ]
13211321 g .background_callback_manager = (
13221322 cb .get ("manager" ) or self ._background_manager
@@ -1383,7 +1383,7 @@ def dispatch(self):
13831383 )
13841384 )
13851385
1386- if not app_studio and nlibs != len (ComponentRegistry .registry ):
1386+ if not _allow_dynamic and nlibs != len (ComponentRegistry .registry ):
13871387 print (
13881388 "Warning: component library imported during callback, move to top-level for full support." ,
13891389 file = sys .stderr ,
You can’t perform that action at this time.
0 commit comments