towerops/lib/towerops_web/controllers/api
Graham McIntire 0ed82c47b9
Make agent heartbeat endpoint asynchronous for faster response
Changed heartbeat database update from synchronous to async using Task.start.
This reduces response time from ~20ms to <1ms by not waiting for the
database write to complete before sending the response.

The heartbeat is a fire-and-forget operation where the agent doesn't
need confirmation that the update succeeded.

In test environment, it remains synchronous to avoid DB ownership issues.
2026-01-14 17:01:57 -06:00
..
agent_controller.ex Make agent heartbeat endpoint asynchronous for faster response 2026-01-14 17:01:57 -06:00