jim 6cec7afb53 Changes Summary
appsettings.json — Added PoolEnabled to each API section:
- TumblrApi → true
- TumblrApi3 → false
- TumblrApi4 → true
DataAccess.cs — Added:
- ApiKeyConfig class — holds credentials + metadata per key
- ApiKeyPool class — manages pool with round-robin rotation, SQLite-backed state (ApiKeyPoolState, ApiKeyPoolMeta tables)
  - GetCurrentKey() — returns next key, skipping rate-limited ones, falls back to earliest-recovery if all are throttled
  - MarkRateLimited(key, retryUntil) / MarkAvailable(key) — persists state
  - Initialize() — discovers pool-enabled keys, detects single-key override mode
- Refactored APIAccess.GrabNotes(), GrabPostWithReplies(), GrabLikes() to accept ApiKeyConfig param and log [Key#N]
Program.cs — Updated:
- Tracks apiExplicitlySet flag from -api/-api3/-api4
- Initializes ApiKeyPool at startup (pool mode or single-key override)
- All 3 API callers updated to use pool rotation + 429 handling
Startup Output
- Pool mode: [Pool] Active keys: Key#1=TumblrApi, Key#2=TumblrApi4
- Single-key: [Pool] Single-key mode: TumblrApi3
2026-05-03 13:31:28 -05:00
2025-11-24 11:58:55 -06:00
2026-05-03 13:31:28 -05:00
2024-10-30 09:14:50 -05:00
.
2026-03-26 00:35:24 -05:00
.
2026-03-26 00:35:24 -05:00
.
2026-03-26 00:35:24 -05:00
.
2026-03-26 00:35:24 -05:00
.
2026-03-26 00:35:24 -05:00
.
2026-03-26 00:35:24 -05:00
.
2026-03-26 00:35:24 -05:00
2024-10-30 09:14:53 -05:00
S
Description
No description provided
136 MiB
Languages
C# 98.1%
PLpgSQL 1.9%