Skip to content

Commit

Permalink
Merge pull request #1909 from HubSpot/uploader_efficiency
Browse files Browse the repository at this point in the history
Skip fuser/lsof check when uploader is marked as immediate
  • Loading branch information
ssalinas authored Mar 6, 2019
2 parents 274c39a + cc8c222 commit 8b2cc5e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int uploadBatch(List<Path> toUpload) {
for (int i = 0; i < toUpload.size(); i++) {
final Context context = metrics.getUploadTimer().time();
final Path file = toUpload.get(i);
if (!configuration.isCheckForOpenFiles() || !isFileOpen(file, configuration.isCheckOpenFilesViaFuser())) {
if (!configuration.isCheckForOpenFiles() || uploadMetadata.isImmediate() || !isFileOpen(file, configuration.isCheckOpenFilesViaFuser())) {
try {
uploadSingle(i, file);
metrics.upload();
Expand Down

0 comments on commit 8b2cc5e

Please sign in to comment.