Skip to content
Snippets Groups Projects
Commit 17ce21d7 authored by Michael Kozono's avatar Michael Kozono
Browse files

Use ionice absolute path

parent f5fa3987
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -80,14 +80,15 @@ module Gitlab
def build_find_command(search_dir)
cmd = %W[find #{search_dir} -type f ! ( -path #{EXCLUDED_HASHED_UPLOADS_PATH} -prune ) ! ( -path #{EXCLUDED_TMP_UPLOADS_PATH} -prune ) -print0]
 
cmd = %w[ionice -c Idle] + cmd if ionice_is_available?
ionice = which_ionice
cmd = %W[#{ionice} -c Idle] + cmd if ionice
 
Rails.logger.info "PrepareUntrackedUploads find command: \"#{cmd.join(' ')}\""
 
cmd
end
 
def ionice_is_available?
def which_ionice
Gitlab::Utils.which('ionice')
rescue StandardError
# In this case, returning false is relatively safe, even though it isn't very nice
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment