fsanyoto commited on
Commit
f22507f
·
verified ·
1 Parent(s): c36eba4

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
Files changed (1) hide show
  1. api/main.py +13 -0
api/main.py CHANGED
@@ -266,6 +266,19 @@ if _WEB_DIST.is_dir():
266
  def _prewarm():
267
  import time as _t
268
  t0 = _t.time()
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  try:
270
  from harness import runtime as _runtime
271
  rt = _runtime.get_runtime("royal-imports")
 
266
  def _prewarm():
267
  import time as _t
268
  t0 = _t.time()
269
+ # ⛔ SEED THE ANALYTICAL STORE FIRST (2026-07-31, owner item 1). `harness.datastore` powers
270
+ # every measure column/condition, and ONLY app.py used to call `ensure_seed()` — so on a
271
+ # fresh Space disk this container resolved measures against a store that never existed:
272
+ # `ready()` stayed False forever, the transient rule kept retrying, and every measure cell
273
+ # served blank while the same code worked locally (where the file already exists).
274
+ # Fail-quiet like the rest of the warm-up: no seed/token → the columns stay blank and the
275
+ # rows still serve.
276
+ try:
277
+ from harness import datastore as _ds
278
+ if _ds.ensure_seed():
279
+ print(f"[aios-api] datastore seeded in {_t.time() - t0:.1f}s")
280
+ except Exception as e: # noqa: BLE001
281
+ print(f"[aios-api] datastore seed skipped: {e}")
282
  try:
283
  from harness import runtime as _runtime
284
  rt = _runtime.get_runtime("royal-imports")