summaryrefslogtreecommitdiff
path: root/app/services/projects/alerting/notify_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/projects/alerting/notify_service.rb')
-rw-r--r--app/services/projects/alerting/notify_service.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/services/projects/alerting/notify_service.rb b/app/services/projects/alerting/notify_service.rb
index 86c408aeec8..e08bc8efb15 100644
--- a/app/services/projects/alerting/notify_service.rb
+++ b/app/services/projects/alerting/notify_service.rb
@@ -4,7 +4,7 @@ module Projects
module Alerting
class NotifyService < BaseService
include Gitlab::Utils::StrongMemoize
- include IncidentManagement::Settings
+ include ::IncidentManagement::Settings
def execute(token)
return forbidden unless alerts_service_activated?
@@ -55,7 +55,7 @@ module Projects
def find_alert_by_fingerprint(fingerprint)
return unless fingerprint
- AlertManagement::Alert.for_fingerprint(project, fingerprint).first
+ AlertManagement::Alert.not_resolved.for_fingerprint(project, fingerprint).first
end
def send_email?
@@ -65,8 +65,7 @@ module Projects
def process_incident_issues(alert)
return if alert.issue
- IncidentManagement::ProcessAlertWorker
- .perform_async(project.id, parsed_payload, alert.id)
+ ::IncidentManagement::ProcessAlertWorker.perform_async(nil, nil, alert.id)
end
def send_alert_email
@@ -76,7 +75,7 @@ module Projects
end
def parsed_payload
- Gitlab::Alerting::NotificationPayloadParser.call(params.to_h)
+ Gitlab::Alerting::NotificationPayloadParser.call(params.to_h, project)
end
def valid_token?(token)