feat: hook topology inference into polling pipeline
DevicePollerWorker calls Topology.process_device/2 after saving neighbor data. Topology updates incrementally every poll cycle.
This commit is contained in:
parent
be153d364e
commit
02f1af6fe3
1 changed files with 9 additions and 0 deletions
|
|
@ -328,6 +328,15 @@ defmodule Towerops.Workers.DevicePollerWorker do
|
|||
"device:#{device.id}",
|
||||
{:neighbors_updated, device.id}
|
||||
)
|
||||
|
||||
# Run topology inference after neighbor data is saved
|
||||
case Towerops.Topology.process_device(device, device.organization_id) do
|
||||
{:ok, :changed} ->
|
||||
Logger.debug("Topology updated for #{device.name}")
|
||||
|
||||
{:ok, :unchanged} ->
|
||||
:ok
|
||||
end
|
||||
rescue
|
||||
error ->
|
||||
Logger.error("Error polling neighbors for #{device.name}: #{inspect(error)}\n#{Exception.format_stacktrace()}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue