Files
libredesk/cmd
Abhinav Raut f417aacb92 drain AI workers on shutdown before closing the database
The AI agent and embedding goroutines only stopped on ctx cancellation.
main() never waited for them, so a worker mid-reply could still hit the
database after db.Close() ran.

Give both AI managers a Close() that stops accepting new work and waits for
in-flight workers, matching the existing webhook/sla shutdown pattern. Wire
aiAgent.Close() and ai.Close() into main's shutdown right after the HTTP
server stops, so in-flight work finishes while its dependencies are still up
and before the database closes. Queued-but-unstarted jobs are dropped since
ctx is already cancelled - shutdown stays fast instead of grinding through a
backlog of slow AI calls.
2026-07-21 11:24:53 +05:30
..
2026-02-22 15:12:00 +05:30
2026-04-09 13:55:39 +05:30
2025-04-03 03:00:11 +05:30
2026-05-15 02:47:30 +05:30
2026-02-22 15:12:00 +05:30
2025-12-26 04:52:30 +05:30
2026-02-22 15:12:00 +05:30
2026-02-22 15:12:00 +05:30
2026-04-17 02:41:40 +05:30