fsanyoto commited on
Commit
bbd2f91
·
verified ·
1 Parent(s): f03fdf0

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "e39ffb9a4",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "8bd815e4ee",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- e39ffb9a4
 
1
+ 8bd815e4ee
api/routes_sheet.py CHANGED
@@ -2689,6 +2689,10 @@ def read_sheet_catch_up(workbook_id: str, session: Session = Depends(require_ses
2689
  if _database_catching_up(session, target))
2690
  except HTTPException:
2691
  continue
 
 
 
 
2692
  if held:
2693
  # C1's newest map can name unrelated databases. Return only the held sources' progress.
2694
  if None in held or not held <= set(sources):
 
2689
  if _database_catching_up(session, target))
2690
  except HTTPException:
2691
  continue
2692
+ if held:
2693
+ break # The first held cell answers, as before: one held template took 53 s per poll.
2694
+ if held:
2695
+ break
2696
  if held:
2697
  # C1's newest map can name unrelated databases. Return only the held sources' progress.
2698
  if None in held or not held <= set(sources):
platform/harness/mirror_store.py CHANGED
@@ -67,7 +67,7 @@ def _catch_up_source(rt, connector):
67
  return _CATCH_UP.setdefault(identity, {}).setdefault(connector, {
68
  "current": False, "parts": set(), "part_total": 0,
69
  "passes": 0, "pass_pending": False, "newest": {}, "refused": False, "misses": 0, "behind": "",
70
- "attempt_at": 0.0, "missed_at": 0.0, "miss_reason": ""})
71
 
72
 
73
  def connected_sources(rt):
@@ -115,14 +115,22 @@ def source_catching_up(rt, connector):
115
  BEHIND_AFTER_PASSES = {"odoo": 3}
116
  #: A miss that no new pass followed within this many seconds also reads behind.
117
  BEHIND_AFTER_SECONDS = 900
 
 
118
 
119
 
120
  def _behind(state):
121
- """The settled reason, or the last miss's reason once no retry followed it in time."""
122
- if state["behind"] or state["current"] or not state["misses"]:
123
  return state["behind"]
124
- waited = state["missed_at"] >= state["attempt_at"] and time.time() - state["missed_at"] >= BEHIND_AFTER_SECONDS
125
- return state["miss_reason"] if waited else ""
 
 
 
 
 
 
126
 
127
 
128
  def _record_miss(connector, state, reason):
 
67
  return _CATCH_UP.setdefault(identity, {}).setdefault(connector, {
68
  "current": False, "parts": set(), "part_total": 0,
69
  "passes": 0, "pass_pending": False, "newest": {}, "refused": False, "misses": 0, "behind": "",
70
+ "attempt_at": 0.0, "missed_at": 0.0, "miss_reason": "", "since": time.time()})
71
 
72
 
73
  def connected_sources(rt):
 
115
  BEHIND_AFTER_PASSES = {"odoo": 3}
116
  #: A miss that no new pass followed within this many seconds also reads behind.
117
  BEHIND_AFTER_SECONDS = 900
118
+ #: A restored source that no pass has started on within this many seconds reads behind.
119
+ IDLE_BEHIND_SECONDS = 1800
120
 
121
 
122
  def _behind(state):
123
+ """The settled reason, or a plain reason once no pass followed a miss or a restore in time."""
124
+ if state["behind"] or state["current"]:
125
  return state["behind"]
126
+ now = time.time()
127
+ if state["misses"]:
128
+ waited = state["missed_at"] >= state["attempt_at"] and now - state["missed_at"] >= BEHIND_AFTER_SECONDS
129
+ return state["miss_reason"] if waited else ""
130
+ # A restored source whose pass was skipped (a resumed pass already pulled it) waits a whole cadence.
131
+ idle = (state["pass_pending"] and not state.get("attempt_at") and len(state["parts"]) >= state["part_total"]
132
+ and now - state.get("since", now) >= IDLE_BEHIND_SECONDS)
133
+ return "Its sync has not run since the restart." if idle else ""
134
 
135
 
136
  def _record_miss(connector, state, reason):
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- e596fa70d4aa9744f1890c1d5adba0d9b461af083a558fc1a337fdff28fcc7f2
 
1
+ 5fcf3e02c7a5de6d98d4169d43603ff197831506a49cfc9d39f065511bf3d13f
web/src/connectors/ConnectorsPage.tsx CHANGED
@@ -809,9 +809,9 @@ export default function ConnectorsPage({
809
  load.phase === "ready" &&
810
  load.rows.some((row) => ["odoo", "amazon_sp", "meta_ads"].includes(row.key) && row.state === "connected");
811
  const catchUpStatus = useConnectorCatchUp(hasConnectedSourceCard);
812
- // Each source card shows its own catch-up; the Odoo card alone reports a status read error.
813
  const sourceCard = (row: ConnectorRow) => ["odoo", "amazon_sp", "meta_ads"].includes(row.key)
814
- ? sourceCatchUp(catchUpStatus.catchUp, catchUpSourceKey(row.key)) : undefined;
815
  const [odooWarnings, setOdooWarnings] = useState<string[]>([]);
816
  useEffect(() => {
817
  if (!hasOdooCard) return;
 
809
  load.phase === "ready" &&
810
  load.rows.some((row) => ["odoo", "amazon_sp", "meta_ads"].includes(row.key) && row.state === "connected");
811
  const catchUpStatus = useConnectorCatchUp(hasConnectedSourceCard);
812
+ // Each connected source card shows its own catch-up; the Odoo card alone reports a status read error.
813
  const sourceCard = (row: ConnectorRow) => ["odoo", "amazon_sp", "meta_ads"].includes(row.key)
814
+ && row.state === "connected" ? sourceCatchUp(catchUpStatus.catchUp, catchUpSourceKey(row.key)) : undefined;
815
  const [odooWarnings, setOdooWarnings] = useState<string[]>([]);
816
  useEffect(() => {
817
  if (!hasOdooCard) return;