mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
Revert "ACS-6168: Add 5 retries when retrieving the temp directory to deal with clashes when high load is applied immediatelly at startup"
This reverts commit ab7058870d2da3a8a10300c4ddba22b5c16fe9a5.
This commit is contained in:
parent
ab7058870d
commit
52147b7e51
@ -271,16 +271,12 @@ public class FileManager
|
||||
|
||||
final File systemTempDir = new File(systemTempDirPath);
|
||||
final File tempDir = new File(systemTempDir, dirName);
|
||||
|
||||
int retrieveTempDirAttemptLimit = 5;
|
||||
for (int i = 0; i < retrieveTempDirAttemptLimit; i++) {
|
||||
if (tempDir.exists() || tempDir.mkdirs())
|
||||
{
|
||||
return tempDir;
|
||||
}
|
||||
if (!tempDir.exists() && !tempDir.mkdirs() && !tempDir.exists())
|
||||
{
|
||||
throw new RuntimeException("Failed to create temp directory: " + tempDir);
|
||||
}
|
||||
|
||||
throw new RuntimeException("Failed to create temp directory: " + tempDir);
|
||||
return tempDir;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -230,16 +230,12 @@ public class FileManager
|
||||
|
||||
final File systemTempDir = new File(systemTempDirPath);
|
||||
final File tempDir = new File(systemTempDir, dirName);
|
||||
|
||||
int retrieveTempDirAttemptLimit = 5;
|
||||
for (int i = 0; i < retrieveTempDirAttemptLimit; i++) {
|
||||
if (tempDir.exists() || tempDir.mkdirs())
|
||||
{
|
||||
return tempDir;
|
||||
}
|
||||
if (!tempDir.exists() && !tempDir.mkdirs())
|
||||
{
|
||||
throw new RuntimeException("Failed to create temp directory: " + tempDir);
|
||||
}
|
||||
|
||||
throw new RuntimeException("Failed to create temp directory: " + tempDir);
|
||||
return tempDir;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user