mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 18:33:13 +00:00
add subdef building duration in task log
This commit is contained in:
@@ -169,6 +169,8 @@ class SubdefGenerator
|
|||||||
|
|
||||||
private function generateSubdef(\record_adapter $record, \databox_subdef $subdef_class, $pathdest)
|
private function generateSubdef(\record_adapter $record, \databox_subdef $subdef_class, $pathdest)
|
||||||
{
|
{
|
||||||
|
$start = microtime(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (null === $record->get_hd_file()) {
|
if (null === $record->get_hd_file()) {
|
||||||
$this->logger->info('No HD file found, aborting');
|
$this->logger->info('No HD file found, aborting');
|
||||||
@@ -203,8 +205,24 @@ class SubdefGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (MediaAlchemystException $e) {
|
} catch (MediaAlchemystException $e) {
|
||||||
|
$start = 0;
|
||||||
$this->logger->error(sprintf('Subdef generation failed for record %d with message %s', $record->getRecordId(), $e->getMessage()));
|
$this->logger->error(sprintf('Subdef generation failed for record %d with message %s', $record->getRecordId(), $e->getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$stop = microtime(true);
|
||||||
|
if($start){
|
||||||
|
$duration = $stop - $start;
|
||||||
|
|
||||||
|
$this->logger->info(sprintf('Subdef %s generated, duration = %s / sbasid=%s / databox=%s / recordid=%s',
|
||||||
|
$subdef_class->get_name(),
|
||||||
|
date('H:i:s', $duration),
|
||||||
|
$record->getDatabox()->get_sbas_id(),
|
||||||
|
$record->getDatabox()->get_dbname(),
|
||||||
|
$record->getRecordId()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generatePdfSubdef($source, $pathdest)
|
private function generatePdfSubdef($source, $pathdest)
|
||||||
|
|||||||
Reference in New Issue
Block a user