Spaces:
Sleeping
Sleeping
Fix for external superlink (#6)
Browse files
blossomtune_gradio/processing.py
CHANGED
|
@@ -58,11 +58,15 @@ def start_runner(
|
|
| 58 |
):
|
| 59 |
if process_store["runner"] and process_store["runner"].poll() is None:
|
| 60 |
return False, "A Runner process is already running."
|
| 61 |
-
if
|
|
|
|
|
|
|
|
|
|
| 62 |
return (
|
| 63 |
False,
|
| 64 |
"Superlink is not running. Please start it before starting the runner.",
|
| 65 |
)
|
|
|
|
| 66 |
if not all([runner_app, run_id, num_partitions]):
|
| 67 |
return False, "Please provide a Runner App, Run ID, and Total Partitions."
|
| 68 |
if not num_partitions.isdigit() or int(num_partitions) <= 0:
|
|
|
|
| 58 |
):
|
| 59 |
if process_store["runner"] and process_store["runner"].poll() is None:
|
| 60 |
return False, "A Runner process is already running."
|
| 61 |
+
if (
|
| 62 |
+
not (process_store["superlink"] and process_store["superlink"].poll() is None)
|
| 63 |
+
and not cfg.SUPERLINK_MODE == "external"
|
| 64 |
+
):
|
| 65 |
return (
|
| 66 |
False,
|
| 67 |
"Superlink is not running. Please start it before starting the runner.",
|
| 68 |
)
|
| 69 |
+
# TODO: check if external superlink is running
|
| 70 |
if not all([runner_app, run_id, num_partitions]):
|
| 71 |
return False, "Please provide a Runner App, Run ID, and Total Partitions."
|
| 72 |
if not num_partitions.isdigit() or int(num_partitions) <= 0:
|