Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
b1787289
Commit
b1787289
authored
14 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
fix: retrying logic and warning messages on failure
SVN: 18661
parent
46e01ebc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/source/java/ch/systemsx/cisd/common/process/FileRenamingCallable.java
+5
-4
5 additions, 4 deletions
...ch/systemsx/cisd/common/process/FileRenamingCallable.java
with
5 additions
and
4 deletions
common/source/java/ch/systemsx/cisd/common/process/FileRenamingCallable.java
+
5
−
4
View file @
b1787289
...
@@ -84,10 +84,10 @@ public final class FileRenamingCallable implements Callable<Boolean>
...
@@ -84,10 +84,10 @@ public final class FileRenamingCallable implements Callable<Boolean>
Unix
.
setAccessMode
(
destinationFile
.
getPath
(),
permissions
);
Unix
.
setAccessMode
(
destinationFile
.
getPath
(),
permissions
);
}
catch
(
IOExceptionUnchecked
ex
)
}
catch
(
IOExceptionUnchecked
ex
)
{
{
// return value does the job
operationLog
.
warn
(
String
.
format
(
operationLog
.
warn
(
String
.
format
(
"Exception on setting access while moving "
"Moving path '%s' to directory '%s' failed (attempt %d)."
,
sourceFile
,
+
"path '%s' to directory '%s' (attempt %d)."
,
sourceFile
,
destinationFile
,
++
failures
),
ex
.
getCause
());
destinationFile
,
++
failures
),
ex
.
getCause
());
return
null
;
// Return null to make CallableExecutor try to repeat operation
}
}
}
}
if
(
renamed
==
false
)
if
(
renamed
==
false
)
...
@@ -95,8 +95,9 @@ public final class FileRenamingCallable implements Callable<Boolean>
...
@@ -95,8 +95,9 @@ public final class FileRenamingCallable implements Callable<Boolean>
operationLog
.
warn
(
String
.
format
(
operationLog
.
warn
(
String
.
format
(
"Moving path '%s' to directory '%s' failed (attempt %d)."
,
sourceFile
,
"Moving path '%s' to directory '%s' failed (attempt %d)."
,
sourceFile
,
destinationFile
,
++
failures
));
destinationFile
,
++
failures
));
return
null
;
// Return null to make CallableExecutor try to repeat operation
}
}
}
}
return
renamed
;
return
true
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment