Quality of life things.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Build and test / requirements (push) Failing after 3m48s
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Build and test / requirements (push) Failing after 3m48s
This commit is contained in:
@@ -65,19 +65,25 @@ class CommandBackup extends Command
|
||||
$rclone = new Rclone($app->getLogger()->withName('rclone'), (string)$app->getConfig('rclone.path'));
|
||||
|
||||
$notification = new Notification();
|
||||
/** @var array<array-key,array<string,string>> */
|
||||
/**
|
||||
* @var array<array-key,array<string,string>>
|
||||
*/
|
||||
$notificationConfig = $app->getConfig('notification');
|
||||
$notification->loadMany($notificationConfig);
|
||||
|
||||
/** @var array<string,string> */
|
||||
/**
|
||||
* @var array<string,string>
|
||||
*/
|
||||
$templateConfig = $app->getConfig('templates');
|
||||
$render = new Twig($templateConfig);
|
||||
|
||||
/** @var array{title: string, source: string, destination: string}[] */
|
||||
/**
|
||||
* @var array{title: string, source: string, destination: string}[]
|
||||
*/
|
||||
$backupElements = $app->getConfig('backup');
|
||||
foreach ($sioProgressbar->progressIterate($backupElements) as $conf) {
|
||||
$title = $conf['title'];
|
||||
$template = array();
|
||||
$template = [];
|
||||
$template['config'] = $conf;
|
||||
try {
|
||||
$template['start'] = new DateTime();
|
||||
@@ -85,7 +91,9 @@ class CommandBackup extends Command
|
||||
$template['rclone_version'] = $rclone->getVersion();
|
||||
$template['destination_size_before'] = $rclone->getSize($conf['destination']);
|
||||
|
||||
/** @var array<array-key, string> */
|
||||
/**
|
||||
* @var array<array-key, string>
|
||||
*/
|
||||
$rcloneOptions = $app->getConfig('rclone.options');
|
||||
$rclone->copy($conf['source'], $conf['destination'], $rcloneOptions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user