]> BookStack Code Mirror - system-cli/commitdiff
Added improvements from testing on bsdemo
authorDan Brown <redacted>
Mon, 1 May 2023 15:02:32 +0000 (16:02 +0100)
committerDan Brown <redacted>
Mon, 1 May 2023 15:02:32 +0000 (16:02 +0100)
- Updated default info text to be cyan instead of blue for readability.
- Added "ZIP" in backup command details to make the file type clear.
- Updated some really low MySQL timeouts.

run.php
src/Commands/BackupCommand.php
src/Services/MySqlRunner.php

diff --git a/run.php b/run.php
index 10ee64b337f262d142ddcb13f58c4c53d4057c2e..56d19524f87c8beb083043bf45b4f52e30ece80b 100644 (file)
--- a/run.php
+++ b/run.php
@@ -17,7 +17,7 @@ $app = require __DIR__ . '/src/app.php';
 $output =  new ConsoleOutput();
 $formatter = $output->getFormatter();
 $formatter->setStyle('warn', new OutputFormatterStyle('yellow'));
-$formatter->setStyle('info', new OutputFormatterStyle('blue'));
+$formatter->setStyle('info', new OutputFormatterStyle('cyan'));
 $formatter->setStyle('success', new OutputFormatterStyle('green'));
 $formatter->setStyle('error', new OutputFormatterStyle('red'));
 
index 39b3cddf533e70e76a00b11698672b8fe64fec53..0c4f014022d9d8e7e776a34077b2439eca263ccc 100644 (file)
@@ -21,7 +21,7 @@ final class BackupCommand extends Command
     {
         $this->setName('backup');
         $this->setDescription('Backup a BookStack installation to a single compressed ZIP file.');
-        $this->addArgument('backup-path', InputArgument::OPTIONAL, 'Outfile file or directory to store the resulting backup file.', '');
+        $this->addArgument('backup-path', InputArgument::OPTIONAL, 'Outfile file or directory to store the resulting backup ZIP file.', '');
         $this->addOption('no-database', null, InputOption::VALUE_NONE, "Skip adding a database dump to the backup");
         $this->addOption('no-uploads', null, InputOption::VALUE_NONE, "Skip adding uploaded files to the backup");
         $this->addOption('no-themes', null, InputOption::VALUE_NONE, "Skip adding the themes folder to the backup");
index 5ccd5f80ed0042385c58b5bdeb844da8b719e746..8a91aadbe629b6c62d229a04102c28519b8d3a56 100644 (file)
@@ -32,8 +32,8 @@ class MySqlRunner
     {
         $output = (new ProgramRunner('mysql', '/usr/bin/mysql'))
             ->withEnvironment(['MYSQL_PWD' => $this->password])
-            ->withTimeout(240)
-            ->withIdleTimeout(5)
+            ->withTimeout(300)
+            ->withIdleTimeout(300)
             ->runCapturingStdErr([
                 '-h', $this->host,
                 '-P', $this->port,