File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
components/ImportExportBundle/src Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11parameters :
22 import_export.default.default_batch_limit : 50
3+ import_export.reader.mdb.converter_timeout : 120
Original file line number Diff line number Diff line change @@ -31,5 +31,7 @@ services:
3131
3232 AlmaviaCX\Bundle\IbexaImportExport\Reader\Mdb\MdbReader :
3333 parent : AlmaviaCX\Bundle\IbexaImportExport\Reader\File\AbstractFileReader
34+ arguments :
35+ $converterTimeout : ' %import_export.reader.mdb.converter_timeout%'
3436 tags :
3537 - { name: almaviacx.import_export.component, alias: reader.mdb}
Original file line number Diff line number Diff line change @@ -21,12 +21,15 @@ class MdbReader extends AbstractFileReader
2121 /** @var resource */
2222 protected $ dbFile ;
2323 protected Connection $ connection ;
24+ protected int $ converterTimeout ;
2425
2526 public function __construct (
2627 FileHandler $ fileHandler ,
27- string $ converterPath = __DIR__ .'/../../../../bin/mdb-to-sqlite.bash '
28+ string $ converterPath = __DIR__ .'/../../../../bin/mdb-to-sqlite.bash ' ,
29+ int $ converterTimeout = 120
2830 ) {
2931 $ this ->converterPath = $ converterPath ;
32+ $ this ->converterTimeout = $ converterTimeout ;
3033 parent ::__construct ($ fileHandler );
3134 }
3235
@@ -46,6 +49,7 @@ public function prepare(): void
4649 $ tmpFileMetadata ['uri ' ],
4750 ]
4851 );
52+ $ process ->setTimeout ($ this ->converterTimeout );
4953 $ process ->run ();
5054 if (!$ process ->isSuccessful ()) {
5155 throw new RuntimeException (
You can’t perform that action at this time.
0 commit comments