diff options
Diffstat (limited to 'app/workers/project_service_worker.rb')
-rw-r--r-- | app/workers/project_service_worker.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/workers/project_service_worker.rb b/app/workers/project_service_worker.rb index 6d809dfb22b..f73958a6ef9 100644 --- a/app/workers/project_service_worker.rb +++ b/app/workers/project_service_worker.rb @@ -13,10 +13,13 @@ class ProjectServiceWorker # rubocop:disable Scalability/IdempotentWorker def perform(hook_id, data) data = data.with_indifferent_access - integration = Integration.find(hook_id) - integration.execute(data) - rescue StandardError => error - integration_class = integration&.class&.name || "Not Found" - Gitlab::ErrorTracking.log_exception(error, integration_class: integration_class) + integration = Integration.find_by_id(hook_id) + return unless integration + + begin + integration.execute(data) + rescue StandardError => error + integration.log_exception(error) + end end end |