mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Merge pull request #2721 from aynsix/PHRAS-2175-task-log-size
PHRAS-2175 fix size in task log
This commit is contained in:
@@ -170,6 +170,7 @@ class SubdefGenerator
|
||||
private function generateSubdef(\record_adapter $record, \databox_subdef $subdef_class, $pathdest)
|
||||
{
|
||||
$start = microtime(true);
|
||||
$destFile = null;
|
||||
|
||||
try {
|
||||
if (null === $record->get_hd_file()) {
|
||||
@@ -178,8 +179,6 @@ class SubdefGenerator
|
||||
return;
|
||||
}
|
||||
|
||||
$destFile = null;
|
||||
|
||||
if($subdef_class->getSpecs() instanceof Video && !empty($this->tmpDirectory)){
|
||||
$destFile = $pathdest;
|
||||
$pathdest = $this->filesystem->generateTemporaryFfmpegPathname($record, $subdef_class, $this->tmpDirectory);
|
||||
@@ -214,7 +213,12 @@ class SubdefGenerator
|
||||
$duration = $stop - $start;
|
||||
|
||||
$originFileSize = $this->sizeHumanReadable($record->get_hd_file()->getSize());
|
||||
$generatedFileSize = $this->sizeHumanReadable(filesize($pathdest));
|
||||
|
||||
if($destFile){
|
||||
$generatedFileSize = $this->sizeHumanReadable(filesize($destFile));
|
||||
}else{
|
||||
$generatedFileSize = $this->sizeHumanReadable(filesize($pathdest));
|
||||
}
|
||||
|
||||
$this->logger->info(sprintf('*** Generated *** %s , duration=%s / source size=%s / %s size=%s / sbasid=%s / databox=%s / recordid=%s',
|
||||
$subdef_class->get_name(),
|
||||
|
Reference in New Issue
Block a user