Cache economic calendar for 1 hour, fix SCAN_BUTTONS test for EUR-only
The weekly calendar JSON was re-fetched on every scan cycle (~288 calls/day). Now cached per-instance with 1-hour TTL, cutting to ~24. Currency filtering still applied on each read so cached events stay correct across pairs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1475,7 +1475,7 @@ def _():
|
||||
|
||||
@test("SCAN_BUTTONS and SCAN_LOOKUP consistency")
|
||||
def _():
|
||||
assert len(SCAN_BUTTONS) == 10 # 5 per pair (4 TFs + All) × 2 pairs
|
||||
assert len(SCAN_BUTTONS) == 5 # 4 TFs + All for EUR/USD
|
||||
for btn in SCAN_BUTTONS:
|
||||
assert btn["cb"] in SCAN_LOOKUP
|
||||
assert "symbol" in btn
|
||||
|
||||
Reference in New Issue
Block a user