diff options
author | Felipe Artur <felipefac@gmail.com> | 2018-08-21 16:29:50 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2018-09-10 18:01:25 -0300 |
commit | 918475314650100e1fe22d9da26aa962499b9ebc (patch) | |
tree | 59576193169981cdd2de52e517193f63431457e1 /app/workers | |
parent | fab15563963029c9f067d11d3d43fe3e6fac09a1 (diff) | |
download | gitlab-ce-918475314650100e1fe22d9da26aa962499b9ebc.tar.gz |
Log project services errors when executing async
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/project_service_worker.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/workers/project_service_worker.rb b/app/workers/project_service_worker.rb index a0bc9288cf0..25567cec08b 100644 --- a/app/workers/project_service_worker.rb +++ b/app/workers/project_service_worker.rb @@ -7,6 +7,10 @@ class ProjectServiceWorker def perform(hook_id, data) data = data.with_indifferent_access - Service.find(hook_id).execute(data) + service = Service.find(hook_id) + service.execute(data) + rescue => error + service_class = service&.class&.name || "Not Found" + logger.error class: self.class.name, service_class: service_class, message: error.message end end |