Prevents duplicate polling when multiple pods are running by using database-based coordination. Changes: - Added last_snmp_poll_at timestamp to equipment table - Added Equipment.update_snmp_poll_time/1 function - Updated PollerWorker to check last_snmp_poll_at before polling - Polls are skipped if equipment was polled within (interval - 5s) - Updates timestamp before polling (optimistic locking) This ensures that when K8s scales up/down or pods restart, only one pod polls each piece of equipment at a time, preventing wasteful duplicate SNMP queries and database writes. The 5-second grace period accounts for clock drift and processing delays between pods. |
||
|---|---|---|
| .. | ||
| gettext | ||
| repo | ||
| static | ||