added new flag for import/export for request timeout option.

This commit is contained in:
Abdulmhsen B. A. A
2022-04-13 02:35:32 +03:00
parent d785102efd
commit 7d95bbaebb
2 changed files with 20 additions and 0 deletions

View File

@@ -55,6 +55,12 @@ class ExportCommand extends Command
InputOption::VALUE_REQUIRED,
'Disables the proxy for a comma-separated list of hosts that do not require it to get reached.'
)
->addOption(
'timeout',
null,
InputOption::VALUE_REQUIRED,
'Set request timeout in seconds'
)
->addOption(
'servers-filter',
's',
@@ -180,6 +186,10 @@ class ExportCommand extends Command
$opts['client']['no_proxy'] = $input->getOption('no-proxy');
}
if ($input->getOption('timeout')) {
$opts['client']['timeout'] = $input->getOption('timeout');
}
$server['options'] = $opts;
$server['class'] = makeServer($server, $name);

View File

@@ -60,6 +60,12 @@ class ImportCommand extends Command
InputOption::VALUE_REQUIRED,
'Disables the proxy for a comma-separated list of hosts that do not require it to get reached.'
)
->addOption(
'timeout',
null,
InputOption::VALUE_REQUIRED,
'Set request timeout in seconds'
)
->addOption(
'servers-filter',
's',
@@ -200,6 +206,10 @@ class ImportCommand extends Command
$opts['client']['no_proxy'] = $input->getOption('no-proxy');
}
if ($input->getOption('timeout')) {
$opts['client']['timeout'] = $input->getOption('timeout');
}
$server['options'] = $opts;
$server['class'] = makeServer($server, $name);