summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMicaël Bergeron <mbergeron@gitlab.com>2018-03-09 10:32:42 -0500
committerMicaël Bergeron <mbergeron@gitlab.com>2018-03-09 10:32:42 -0500
commit4155f5caf59f40b3020669df39da38e04ae96a7b (patch)
treec9bcfa7e22b4139e2bd560244a786fd024afd74c /lib
parentfc6587f1f21c97fa19e3ae7eaac4e9add7b107b8 (diff)
parentf7b8ae3fe2adc95f18f779d737e60eac45a14223 (diff)
downloadgitlab-ce-4155f5caf59f40b3020669df39da38e04ae96a7b.tar.gz
Merge branch '40781-os-to-ce' of gitlab.com:gitlab-org/gitlab-ce into ce-40781-os-to-ce
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/gitlab/uploads/helpers.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/tasks/gitlab/uploads/helpers.rb b/lib/tasks/gitlab/uploads/helpers.rb
deleted file mode 100644
index 239cba57297..00000000000
--- a/lib/tasks/gitlab/uploads/helpers.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-module UploadTaskHelpers
- def batch_size
- ENV.fetch('BATCH', 200).to_i
- end
-
- def calculate_checksum(absolute_path)
- Digest::SHA256.file(absolute_path).hexdigest
- end
-
- def check_checksum(upload)
- checksum = calculate_checksum(upload.absolute_path)
-
- if checksum != upload.checksum
- puts " * File checksum (#{checksum}) does not match the one in the database (#{upload.checksum})".color(:red)
- end
- end
-
- def uploads_batches(&block)
- Upload.all.in_batches(of: batch_size, start: ENV['ID_FROM'], finish: ENV['ID_TO']) do |relation| # rubocop: disable Cop/InBatches
- yield relation
- end
- end
-end