mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
set exiftool timeout: port PHRAS-1377
This commit is contained in:
@@ -103,6 +103,7 @@ main:
|
|||||||
mp4box_timeout: 60
|
mp4box_timeout: 60
|
||||||
swftools_timeout: 60
|
swftools_timeout: 60
|
||||||
unoconv_timeout: 60
|
unoconv_timeout: 60
|
||||||
|
exiftool_timeout: 60
|
||||||
storage:
|
storage:
|
||||||
subdefs: null
|
subdefs: null
|
||||||
cache: null
|
cache: null
|
||||||
|
@@ -9,6 +9,8 @@ use MediaVorus\MediaVorusServiceProvider;
|
|||||||
use MP4Box\MP4BoxServiceProvider;
|
use MP4Box\MP4BoxServiceProvider;
|
||||||
use Neutron\Silex\Provider\ImagineServiceProvider;
|
use Neutron\Silex\Provider\ImagineServiceProvider;
|
||||||
use PHPExiftool\PHPExiftoolServiceProvider;
|
use PHPExiftool\PHPExiftoolServiceProvider;
|
||||||
|
use PHPExiftool\Reader;
|
||||||
|
use PHPExiftool\Writer;
|
||||||
use Silex\Application;
|
use Silex\Application;
|
||||||
use Silex\ServiceProviderInterface;
|
use Silex\ServiceProviderInterface;
|
||||||
|
|
||||||
@@ -48,6 +50,21 @@ class MediaUtilitiesMetaServiceProvider implements ServiceProviderInterface
|
|||||||
|
|
||||||
public function boot(Application $app)
|
public function boot(Application $app)
|
||||||
{
|
{
|
||||||
// no-op
|
if(isset($app['exiftool.reader']) && isset($app['conf'])) {
|
||||||
|
try {
|
||||||
|
$timeout = $app['conf']->get(['main', 'binaries', 'exiftool_timeout'], 60);
|
||||||
|
|
||||||
|
/** @var Reader $exiftoolReader */
|
||||||
|
$exiftoolReader = $app['exiftool.reader'];
|
||||||
|
$exiftoolReader->setTimeout($timeout);
|
||||||
|
|
||||||
|
/** @var Writer $exiftoolWriter */
|
||||||
|
$exiftoolWriter = $app['exiftool.writer'];
|
||||||
|
$exiftoolWriter->setTimeout($timeout);
|
||||||
|
}
|
||||||
|
catch(\Exception $e) {
|
||||||
|
// no-nop
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,6 +103,7 @@ main:
|
|||||||
mp4box_timeout: 60
|
mp4box_timeout: 60
|
||||||
swftools_timeout: 60
|
swftools_timeout: 60
|
||||||
unoconv_timeout: 60
|
unoconv_timeout: 60
|
||||||
|
exiftool_timeout: 60
|
||||||
storage:
|
storage:
|
||||||
subdefs: null
|
subdefs: null
|
||||||
cache: null
|
cache: null
|
||||||
|
Reference in New Issue
Block a user