Merge branch 'feat/extraction_time' into 'master'
added unzip time for projects as per feature request See merge request sheepitrenderfarm/client!299
This commit is contained in:
@@ -24,6 +24,8 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
@@ -917,12 +919,17 @@ import okhttp3.HttpUrl;
|
||||
this.log.debug("Client::prepareWorkingDirectory Extracting project into " + scene_path);
|
||||
// unzip the archive
|
||||
|
||||
|
||||
Instant startUnzip = Instant.now();
|
||||
ret = Utils.unzipChunksIntoDirectory(
|
||||
ajob.getArchiveChunks().stream().map(chunk -> this.directoryManager.getCachePathFor(chunk)).collect(Collectors.toList()),
|
||||
scene_path,
|
||||
ajob.getPassword(),
|
||||
log);
|
||||
|
||||
Instant stopUnzip = Instant.now();
|
||||
Duration unzipDuration = Duration.between(startUnzip, stopUnzip);
|
||||
log.debug("Unzipping " + ajob.getArchiveChunks().size() + " chunks of \"" + ajob.getName() + "\" took " + unzipDuration.toSeconds() + "s");
|
||||
|
||||
if (ret != 0) {
|
||||
this.log.error("Client::prepareWorkingDirectory, error(2) with Utils.unzipChunksIntoDirectory returned " + ret);
|
||||
this.gui.error(String.format("Unable to extract the scene (error %d)", ret));
|
||||
|
||||
Reference in New Issue
Block a user