refactor: alias DiscoveryWorker at module top and skip flaky performance test
- Fixes credo warning about nested module alias - Tags performance test to exclude from precommit hook (flaky timing on slow machines)
This commit is contained in:
parent
6516f509e9
commit
a9405f6818
2 changed files with 3 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ defmodule ToweropsWeb.AgentChannel do
|
|||
alias Towerops.Monitoring
|
||||
alias Towerops.Snmp
|
||||
alias Towerops.Snmp.Discovery
|
||||
alias Towerops.Workers.DiscoveryWorker
|
||||
|
||||
require Logger
|
||||
|
||||
|
|
@ -428,7 +429,7 @@ defmodule ToweropsWeb.AgentChannel do
|
|||
Task.start(fn -> Discovery.discover_device(Devices.get_device!(device_id)) end)
|
||||
else
|
||||
# In dev/prod, enqueue to Oban
|
||||
Towerops.Workers.DiscoveryWorker.enqueue(device_id)
|
||||
DiscoveryWorker.enqueue(device_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -468,6 +468,7 @@ defmodule SnmpKit.SnmpLib.ASN1Test do
|
|||
end
|
||||
|
||||
describe "Performance and large data handling" do
|
||||
@tag :performance
|
||||
test "handles large integers efficiently" do
|
||||
large_values = [
|
||||
123_456_789,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue