summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-04-11 21:10:12 +0200
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-04-12 12:03:39 +0200
commit23fbbe0c921ab3c878164d49316c4ce82b2035fb (patch)
treee2222ccadba40a2a351556668e808e2c8a5c640d /app/workers
parent069c54a7d7a1d1d6ec1dc48c4212139eff6735df (diff)
downloadgitlab-ce-23fbbe0c921ab3c878164d49316c4ce82b2035fb.tar.gz
Return nil as coverage instead of a File objectzj-fix-coverage-bug
Given a valid pipeline job, and a regex which wouldn't match to a jobs trace, the stream of the trace would return the File object. This was not the case when it matched a value, as that would have been return from the block. Now the `extract_coverage` method returns `nil` if no match was found.
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/build_coverage_worker.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/workers/build_coverage_worker.rb b/app/workers/build_coverage_worker.rb
index def0ab1dde1..f7ae996bb17 100644
--- a/app/workers/build_coverage_worker.rb
+++ b/app/workers/build_coverage_worker.rb
@@ -3,7 +3,6 @@ class BuildCoverageWorker
include BuildQueue
def perform(build_id)
- Ci::Build.find_by(id: build_id)
- .try(:update_coverage)
+ Ci::Build.find_by(id: build_id)&.update_coverage
end
end