Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: push notifications in background
Sometimes when the alert payload is huge, pushing notification takes a lot of I/O time and Alertmanager might timeout the request. This is undesirable since Alertmanager will retry the request but cAlert will keep sending notifications. To handle this, it's better to push notifications in it's own goroutine and send an early response for the request. The downside is that no error will be sent to Alertmanager if pushing notifications failed, but that is a fair trade-off. Retries can be implemented at cAlert level (in a future version).
- Loading branch information