Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_customers.py +20 -0
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v83",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "8d3de70f59c7",
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v83",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
8d3de70f59c7
|
api/routes_customers.py
CHANGED
|
@@ -25,6 +25,7 @@ from copy import copy, deepcopy
|
|
| 25 |
from dataclasses import is_dataclass, replace
|
| 26 |
import hashlib
|
| 27 |
import json
|
|
|
|
| 28 |
import threading
|
| 29 |
import time
|
| 30 |
|
|
@@ -534,6 +535,17 @@ def _wall_stamp(session, table_key):
|
|
| 534 |
return json.dumps(session.user, sort_keys=True, separators=(",", ":"), default=str)
|
| 535 |
|
| 536 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 537 |
def grid_assembly(session: Session, scope: str = "customer", storage_key: str = "",
|
| 538 |
consume_corrections: bool = False, *, build=None, pool_stamp=None,
|
| 539 |
with_rows: bool = True, needed=None):
|
|
@@ -644,8 +656,11 @@ def grid_assembly(session: Session, scope: str = "customer", storage_key: str =
|
|
| 644 |
if time.time() - hit[0] < _CACHE_TTL and valid(memo_key[-1], checked_tokens):
|
| 645 |
result = scope_cache.get(rt.pool_cache, memo_key, _CACHE_TTL, lambda: hit[1], evict)
|
| 646 |
return result
|
|
|
|
| 647 |
with _grid_assembly_lock:
|
| 648 |
rt.pool_cache.pop(memo_key, None)
|
|
|
|
|
|
|
| 649 |
result = None
|
| 650 |
return result
|
| 651 |
|
|
@@ -700,6 +715,11 @@ def grid_assembly(session: Session, scope: str = "customer", storage_key: str =
|
|
| 700 |
memo_key = (*after_key, revisions)
|
| 701 |
scope_cache.get(rt.pool_cache, memo_key, _CACHE_TTL,
|
| 702 |
lambda: entry["result"], evict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 703 |
except BaseException as exc:
|
| 704 |
entry["error"] = exc
|
| 705 |
raise
|
|
|
|
| 25 |
from dataclasses import is_dataclass, replace
|
| 26 |
import hashlib
|
| 27 |
import json
|
| 28 |
+
import os
|
| 29 |
import threading
|
| 30 |
import time
|
| 31 |
|
|
|
|
| 535 |
return json.dumps(session.user, sort_keys=True, separators=(",", ":"), default=str)
|
| 536 |
|
| 537 |
|
| 538 |
+
def _assembly_miss(scope, reason, revisions, tokens, stored_at):
|
| 539 |
+
"""AIOS_HEAVY_PROFILE=1 only: name why an assembly memo missed and which documents moved."""
|
| 540 |
+
if os.environ.get("AIOS_HEAVY_PROFILE") != "1":
|
| 541 |
+
return
|
| 542 |
+
moved = [name for name, token in revisions
|
| 543 |
+
if name in tokens and json.dumps(tokens[name], sort_keys=True, default=str) != token]
|
| 544 |
+
missing = [name for name, _token in revisions if name not in tokens]
|
| 545 |
+
age = "" if stored_at is None else f" age={time.time() - stored_at:.0f}s"
|
| 546 |
+
print(f"[assembly-miss] scope={scope} {reason}{age} moved={moved[:8]} unread={missing[:8]}", flush=True)
|
| 547 |
+
|
| 548 |
+
|
| 549 |
def grid_assembly(session: Session, scope: str = "customer", storage_key: str = "",
|
| 550 |
consume_corrections: bool = False, *, build=None, pool_stamp=None,
|
| 551 |
with_rows: bool = True, needed=None):
|
|
|
|
| 656 |
if time.time() - hit[0] < _CACHE_TTL and valid(memo_key[-1], checked_tokens):
|
| 657 |
result = scope_cache.get(rt.pool_cache, memo_key, _CACHE_TTL, lambda: hit[1], evict)
|
| 658 |
return result
|
| 659 |
+
_assembly_miss(scope, "stale", memo_key[-1], checked_tokens, hit[0])
|
| 660 |
with _grid_assembly_lock:
|
| 661 |
rt.pool_cache.pop(memo_key, None)
|
| 662 |
+
if not candidates:
|
| 663 |
+
_assembly_miss(scope, "no entry for this key", (), {}, None)
|
| 664 |
result = None
|
| 665 |
return result
|
| 666 |
|
|
|
|
| 715 |
memo_key = (*after_key, revisions)
|
| 716 |
scope_cache.get(rt.pool_cache, memo_key, _CACHE_TTL,
|
| 717 |
lambda: entry["result"], evict)
|
| 718 |
+
else:
|
| 719 |
+
_assembly_miss(scope, f"not published wall={same_wall} pool={same_pool}",
|
| 720 |
+
revisions, after_tokens, None)
|
| 721 |
+
else:
|
| 722 |
+
_assembly_miss(scope, "not cacheable", (), {}, None)
|
| 723 |
except BaseException as exc:
|
| 724 |
entry["error"] = exc
|
| 725 |
raise
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
1eb32fd68c6f1ba29b7cb6f65ae9d140fae7707d491ea6edf20f9d8ae6b327be
|