tech(notifications): splitt into 3 queries

closes #5883
This commit is contained in:
bergquist
2016-09-06 08:42:35 +02:00
parent c893e5d241
commit 2ca7284a56
5 changed files with 93 additions and 25 deletions

View File

@@ -88,11 +88,7 @@ func (n *RootNotifier) uploadImage(context *EvalContext) error {
}
func (n *RootNotifier) getNotifiers(orgId int64, notificationIds []int64) ([]Notifier, error) {
query := &m.GetAlertNotificationsQuery{OrgId: orgId}
if len(notificationIds) == 0 {
query.Ids = []int64{0}
}
query := &m.GetAlertNotificationsToSendQuery{OrgId: orgId, Ids: notificationIds}
if err := bus.Dispatch(query); err != nil {
return nil, err