Commit 00f53301 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Remove redundant comment and cop disable

After https://gitlab.com/gitlab-org/gitlab/merge_requests/18002 was
merged, we could use comments on the opening block line, thus the
commentary in `fast_hash_serializer.rb` is no longer relevant.
Also, removing unnecessary cop disable in `base_exporter.rb`.
parent 6d7b1e85
...@@ -135,10 +135,7 @@ module Gitlab ...@@ -135,10 +135,7 @@ module Gitlab
data = [] data = []
# rubocop:disable Cop/InBatches record.in_batches(of: @batch_size) do |batch| # rubocop:disable Cop/InBatches
# If we put `rubocop:disable` inline after `do |batch|`,
# `Cop/LineBreakAroundConditionalBlock` will fail
record.in_batches(of: @batch_size) do |batch|
if Feature.enabled?(:export_fast_serialize_with_raw_json, default_enabled: true) if Feature.enabled?(:export_fast_serialize_with_raw_json, default_enabled: true)
data.append(JSONBatchRelation.new(batch, options, preloads[key]).tap(&:raw_json)) data.append(JSONBatchRelation.new(batch, options, preloads[key]).tap(&:raw_json))
else else
...@@ -146,7 +143,6 @@ module Gitlab ...@@ -146,7 +143,6 @@ module Gitlab
data += batch.as_json(options) data += batch.as_json(options)
end end
end end
# rubocop:enable Cop/InBatches
data data
end end
......
...@@ -36,10 +36,11 @@ module Gitlab ...@@ -36,10 +36,11 @@ module Gitlab
end end
def stop_working def stop_working
if server # rubocop:disable Cop/LineBreakAroundConditionalBlock if server
server.shutdown server.shutdown
server.listeners.each(&:close) server.listeners.each(&:close)
end end
@server = nil @server = nil
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment