Feat: use chunk for renderer
This commit is contained in:
@@ -39,10 +39,6 @@ public class DirectoryManager {
|
||||
return isSharedEnabled() ? getSharedPathFor(chunk) : getCachePathFor(chunk);
|
||||
}
|
||||
|
||||
public String getActualStorageBinaryPathFor(Job job) {
|
||||
return isSharedEnabled() ? getSharedBinaryPathFor(job) : getCacheBinaryPathFor(job);
|
||||
}
|
||||
|
||||
public String getCachePathFor(Chunk chunk) {
|
||||
return configuration.getWoolCacheDirectory().getAbsolutePath() + File.separator + chunk.getId() + ".wool";
|
||||
}
|
||||
@@ -51,22 +47,10 @@ public class DirectoryManager {
|
||||
return configuration.getSharedDownloadsDirectory().getAbsolutePath() + File.separator + chunk.getId() + ".wool";
|
||||
}
|
||||
|
||||
public String getCacheBinaryPathFor(Job job) {
|
||||
return configuration.getWoolCacheDirectory().getAbsolutePath() + File.separator + job.getRendererMD5() + ".zip";
|
||||
}
|
||||
|
||||
public String getSharedBinaryPathFor(Job job) {
|
||||
return configuration.getSharedDownloadsDirectory().getAbsolutePath() + File.separator + job.getRendererMD5() + ".zip";
|
||||
}
|
||||
|
||||
public boolean isSharedEnabled() {
|
||||
return configuration.getSharedDownloadsDirectory() != null && configuration.getSharedDownloadsDirectory().exists();
|
||||
}
|
||||
|
||||
public boolean copyBinaryFromSharedToCache(Job job) {
|
||||
return copyFileFromSharedToCache(getSharedBinaryPathFor(job), getCacheBinaryPathFor(job));
|
||||
}
|
||||
|
||||
public boolean copyChunkFromSharedToCache(Chunk chunk) {
|
||||
return copyFileFromSharedToCache(getSharedPathFor(chunk), getCachePathFor(chunk));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user