Spaces:
Running
Running
Update spark_startup.py
Browse files- spark_startup.py +9 -1
spark_startup.py
CHANGED
@@ -40,11 +40,19 @@ def notify_startup():
|
|
40 |
log("⚠️ SPARK_TOKEN not configured. Skipping Spark startup notification.")
|
41 |
return
|
42 |
|
43 |
-
for p in cfg.projects
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
if not p.enabled:
|
45 |
continue
|
|
|
46 |
v = _select_live_version(p)
|
47 |
if not v:
|
|
|
48 |
continue
|
49 |
|
50 |
plain = cfg.global_config.get_plain_token()
|
|
|
40 |
log("⚠️ SPARK_TOKEN not configured. Skipping Spark startup notification.")
|
41 |
return
|
42 |
|
43 |
+
enabled_projects = [p for p in cfg.projects if p.enabled]
|
44 |
+
|
45 |
+
if not enabled_projects:
|
46 |
+
log("ℹ️ No enabled projects found for startup notification.")
|
47 |
+
return
|
48 |
+
|
49 |
+
for p in enabled_projects:
|
50 |
if not p.enabled:
|
51 |
continue
|
52 |
+
|
53 |
v = _select_live_version(p)
|
54 |
if not v:
|
55 |
+
log(f"⚠️ No published version found for project '{p.name}', skipping startup.")
|
56 |
continue
|
57 |
|
58 |
plain = cfg.global_config.get_plain_token()
|