Skip to content

Commit c230f1c

Browse files
authored
restart the app if it starts with RagStudio, not just exactly equals (#272)
* restart the app if it starts with RagStudio, not just exactly equals * add a comment to explain the logic
1 parent fba6d27 commit c230f1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/restart_app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
if len(cml_apps.applications) > 0:
5252
for app_name in ragstudio_apps:
5353
cml_ragstudio_app = next(
54-
(cml_app for cml_app in cml_apps.applications if cml_app.name == app_name),
54+
(cml_app for cml_app in cml_apps.applications if cml_app.name.startswith(app_name)),
5555
None,
5656
)
5757

@@ -63,6 +63,7 @@
6363
print(
6464
"No RagStudio application found to restart. This can happen if someone renamed the application."
6565
)
66+
# if we're in "studio" mode, then there might be other applications that are not named RagStudio (Agent Studio, etc.)
6667
if os.getenv("IS_COMPOSABLE", "") != "":
6768
print("Composable environment. This is likely the initial deployment.")
6869
else:

0 commit comments

Comments
 (0)