data.json file only (cache-busted, no page reload).
It does not re-pull from moomoo — a genuine re-pull must be run locally with the refresh
pipeline, because moomoo OpenD listens on 127.0.0.1 and is not reachable from
Cloudflare's edge. See REFRESH PIPELINE at the bottom of this page.
The REFRESH DATA button in the header only refetches the published
data.json from this site's own origin. It re-reads a file that was written by a
previous pipeline run; it does not contact moomoo, and it cannot make the numbers newer than
the meta.generated_at_utc stamp shown in the header.
127.0.0.1 (loopback only) and is NOT reachable from Cloudflare's edge.
No edge function, worker or scheduled job in the cloud can reach OpenD. The pull runs on the
machine where OpenD is running, and the resulting data.json is then published.
Run these two commands, in order, on the local machine with moomoo OpenD running:
python refresh_pe_data.py
npx wrangler pages deploy pe_dashboard --project-name index-pe-dashboard --branch main --commit-dirty=true
Step 1 writes pe_dashboard/data.json on the local machine. Step 2 uploads this
directory (including that file) to Cloudflare Pages. Only after step 2 will the REFRESH
button in the header see new numbers.