T16: saldo liquid akun BP di dashboard (API databisnis + cache TTL)

Sel stat SALDO LIQUID menampilkan account.core_liquid_balance dari
GET {DATABISNIS_API}/v2/state/get_account. Cache in-memory per worker
selama DASH_LIQUID_TTL (60s); gagal fetch → nilai lama (atau '—' bila
belum pernah sukses) + cooldown supaya API tak dipukul berulang. Stats
grid 4 kolom desktop, 2x2 tablet. Oracle + smoke lolos.
This commit is contained in:
proitlab committed 2026-08-05 10:41:44 +07:00
1 parent eb4f941b37
commit f0fc4715a1
8 files changed
+112 -8

No files matched your search

+6
View File
@@ -34,3 +34,9 @@ DASH_WORKERS = int(os.getenv('DASH_WORKERS', '2'))
# Ambang batas vote "basi" (hari tanpa revote) — pemilih lewat batas ini dibuang di scan
VEX_STALE_DAYS = int(os.getenv('VEX_STALE_DAYS', '28'))
# API databisnis untuk saldo liquid akun (balance BP, disajikan dashboard)
DATABISNIS_API = os.getenv('DATABISNIS_API', 'https://api.databisnis.id')
# Dashboard: TTL cache (detik) untuk saldo liquid — gagal fetch juga di-cooldown
DASH_LIQUID_TTL = int(os.getenv('DASH_LIQUID_TTL', '60'))