fix bug in discovery poller

This commit is contained in:
Graham McIntire 2026-01-30 16:34:14 -06:00
parent cc07e485b7
commit 57e4084a6e

View file

@ -134,7 +134,7 @@ defmodule Towerops.Workers.DiscoveryWorker do
end
defp log_agent_assignment(device, agent, agent_token_id, source) do
poller_type = if agent.cloud_poller, do: "cloud poller", else: "user's agent"
poller_type = if agent.is_cloud_poller, do: "cloud poller", else: "user's agent"
Logger.info(
"Agent assignment found: using #{poller_type} '#{agent.name}' (assigned via #{source})",
@ -142,7 +142,7 @@ defmodule Towerops.Workers.DiscoveryWorker do
device_name: device.name,
agent_token_id: agent_token_id,
agent_name: agent.name,
cloud_poller: agent.cloud_poller,
is_cloud_poller: agent.is_cloud_poller,
assignment_source: source,
agent_enabled: agent.enabled,
agent_last_seen: agent.last_seen_at