backup add transfer option

This commit is contained in:
xiaomlove
2022-09-18 17:20:51 +08:00
parent 464880f1fb
commit 47493b1a26
5 changed files with 44 additions and 28 deletions
+4 -3
View File
@@ -12,7 +12,7 @@ class BackupWeb extends Command
*
* @var string
*/
protected $signature = 'backup:web {--method=}';
protected $signature = 'backup:web {--method=} {--transfer=}';
/**
* The console command description.
@@ -39,9 +39,10 @@ class BackupWeb extends Command
public function handle()
{
$method = $this->option('method');
$this->info("method: $method");
$transfer = $this->option('transfer');
$this->info("method: $method, transfer: $transfer");
$rep = new ToolRepository();
$result = $rep->backupWeb($method);
$result = $rep->backupWeb($method, $transfer);
$log = sprintf('[%s], %s, result: %s', nexus()->getRequestId(), __METHOD__, var_export($result, true));
$this->info($log);
do_log($log);