Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0e9efa74
Commit
0e9efa74
authored
Nov 08, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `find` `-prune` option for performance
parent
7c43692f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/gitlab/background_migration/prepare_unhashed_uploads.rb
lib/gitlab/background_migration/prepare_unhashed_uploads.rb
+4
-2
No files found.
lib/gitlab/background_migration/prepare_unhashed_uploads.rb
View file @
0e9efa74
...
...
@@ -59,9 +59,11 @@ module Gitlab
end
def
build_find_command
(
search_dir
)
cmd
=
[
'find'
,
search_dir
,
'-type'
,
'f'
,
'!'
,
'-path'
,
"
#{
UPLOAD_DIR
}
/@hashed/*"
,
'!'
,
'-path'
,
"
#{
UPLOAD_DIR
}
/tmp/*"
,
'-print0'
]
hashed_path
=
"
#{
UPLOAD_DIR
}
/@hashed/*"
tmp_path
=
"
#{
UPLOAD_DIR
}
/tmp/*"
cmd
=
%W[find
#{
search_dir
}
-type f ! ( -path
#{
hashed_path
}
-prune ) ! ( -path
#{
tmp_path
}
-prune ) -print0]
[
'ionice'
,
'-c'
,
'Idle'
]
+
cmd
if
ionice_is_available?
%w[ionice -c Idle
]
+
cmd
if
ionice_is_available?
cmd
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment