File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1285,6 +1285,9 @@ 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
+ nlibs = len (ComponentRegistry .registry )
1290
+
1288
1291
g = AttributeDict ({})
1289
1292
1290
1293
g .inputs_list = inputs = body .get ( # pylint: disable=assigning-non-slot
@@ -1365,6 +1368,7 @@ def dispatch(self):
1365
1368
except KeyError as missing_callback_function :
1366
1369
msg = f"Callback function not found for output '{ output } ', perhaps you forgot to prepend the '@'?"
1367
1370
raise KeyError (msg ) from missing_callback_function
1371
+
1368
1372
ctx = copy_context ()
1369
1373
# noinspection PyArgumentList
1370
1374
response .set_data (
@@ -1378,6 +1382,12 @@ def dispatch(self):
1378
1382
)
1379
1383
)
1380
1384
)
1385
+
1386
+ if not app_studio and nlibs != len (ComponentRegistry .registry ):
1387
+ print (
1388
+ "Warning: component library imported during callback, move to top-level for full support." ,
1389
+ file = sys .stderr ,
1390
+ )
1381
1391
return response
1382
1392
1383
1393
def _setup_server (self ):
You can’t perform that action at this time.
0 commit comments