Spaces:
Building
Building
Update spark_startup.py
Browse files- spark_startup.py +10 -0
spark_startup.py
CHANGED
@@ -33,6 +33,11 @@ def _select_live_version(p: ProjectConfig) -> VersionConfig | None:
|
|
33 |
return max(published, key=lambda v: v.id) if published else None
|
34 |
|
35 |
def notify_startup():
|
|
|
|
|
|
|
|
|
|
|
36 |
spark_base = str(cfg.global_config.spark_endpoint).rstrip("/")
|
37 |
spark_token = _get_spark_token()
|
38 |
|
@@ -86,4 +91,9 @@ def notify_startup():
|
|
86 |
log(f"⚠️ Spark startup failed: {e}")
|
87 |
|
88 |
def run_in_thread():
|
|
|
|
|
|
|
|
|
|
|
89 |
threading.Thread(target=notify_startup, daemon=True).start()
|
|
|
33 |
return max(published, key=lambda v: v.id) if published else None
|
34 |
|
35 |
def notify_startup():
|
36 |
+
# GPT mode kontrolü
|
37 |
+
if cfg.global_config.is_gpt_mode():
|
38 |
+
log("🤖 GPT mode detected, skipping Spark startup notification")
|
39 |
+
return
|
40 |
+
|
41 |
spark_base = str(cfg.global_config.spark_endpoint).rstrip("/")
|
42 |
spark_token = _get_spark_token()
|
43 |
|
|
|
91 |
log(f"⚠️ Spark startup failed: {e}")
|
92 |
|
93 |
def run_in_thread():
|
94 |
+
# GPT mode'da thread başlatmaya gerek yok
|
95 |
+
if cfg.global_config.is_gpt_mode():
|
96 |
+
log("🤖 GPT mode - Spark startup thread not started")
|
97 |
+
return
|
98 |
+
|
99 |
threading.Thread(target=notify_startup, daemon=True).start()
|