5-min cron processes up to 100 pending rows per pass: private IPs short-circuit to state=private_ip; same-IP cache (30 days) avoids duplicate ip-api.com calls; reverse DNS via socket with 1.5s timeout; HTTP lookup respects ip-api''s X-Rl rate-limit header. Tests cover private-IP shortcut, cache hit (no HTTP), and internal-state skip -- no network calls needed. Per-row isolation uses cr.savepoint() instead of cr.commit() because Odoo 19 TestCursor raises AssertionError on commit/rollback. Recorded the gotcha as CLAUDE.md rule #14. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.1 KiB
1.1 KiB