migrate therinaldos.com data
Build & Deploy to DigitalOcean Space / build (push) Failing after 2m38s

This commit is contained in:
2024-05-05 15:50:45 -04:00
commit ef1ff240d4
23182 changed files with 3801898 additions and 0 deletions
@@ -0,0 +1,105 @@
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Daniel Kesselberg <mail@danielkesselberg.de>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Robin Appelman <robin@icewind.nl>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OC\Migration;
use OC\NeedsUpdateException;
use OC\Repair;
use OC_App;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
use OCP\BackgroundJob\TimedJob;
use OCP\EventDispatcher\IEventDispatcher;
use Psr\Log\LoggerInterface;
/**
* Class BackgroundRepair
*
* @package OC\Migration
*/
class BackgroundRepair extends TimedJob {
public function __construct(
private IEventDispatcher $dispatcher,
ITimeFactory $time,
private LoggerInterface $logger,
private IJobList $jobList,
) {
parent::__construct($time);
$this->setInterval(15 * 60);
}
/**
* @param array $argument
* @throws \Exception
* @throws \OC\NeedsUpdateException
*/
protected function run($argument): void {
if (!isset($argument['app']) || !isset($argument['step'])) {
// remove the job - we can never execute it
$this->jobList->remove($this, $this->argument);
return;
}
$app = $argument['app'];
try {
$this->loadApp($app);
} catch (NeedsUpdateException $ex) {
// as long as the app is not yet done with it's offline migration
// we better not start with the live migration
return;
}
$step = $argument['step'];
$repair = new Repair([], $this->dispatcher, \OC::$server->get(LoggerInterface::class));
try {
$repair->addStep($step);
} catch (\Exception $ex) {
$this->logger->error($ex->getMessage(), [
'app' => 'migration',
'exception' => $ex,
]);
// remove the job - we can never execute it
$this->jobList->remove($this, $this->argument);
return;
}
// execute the repair step
$repair->run();
// remove the job once executed successfully
$this->jobList->remove($this, $this->argument);
}
/**
* @codeCoverageIgnore
* @param $app
* @throws NeedsUpdateException
*/
protected function loadApp($app): void {
OC_App::loadApp($app);
}
}
@@ -0,0 +1,94 @@
<?php
/**
* @copyright Copyright (c) 2017, ownCloud GmbH
*
* @author Morris Jobke <hey@morrisjobke.de>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OC\Migration;
use OCP\Migration\IOutput;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Class SimpleOutput
*
* Just a simple IOutput implementation with writes messages to the log file.
* Alternative implementations will write to the console or to the web ui (web update case)
*
* @package OC\Migration
*/
class ConsoleOutput implements IOutput {
private ?ProgressBar $progressBar = null;
public function __construct(
private OutputInterface $output,
) {
}
public function debug(string $message): void {
$this->output->writeln($message, OutputInterface::VERBOSITY_VERBOSE);
}
/**
* @param string $message
*/
public function info($message): void {
$this->output->writeln("<info>$message</info>");
}
/**
* @param string $message
*/
public function warning($message): void {
$this->output->writeln("<comment>$message</comment>");
}
/**
* @param int $max
*/
public function startProgress($max = 0): void {
if (!is_null($this->progressBar)) {
$this->progressBar->finish();
}
$this->progressBar = new ProgressBar($this->output);
$this->progressBar->start($max);
}
/**
* @param int $step
* @param string $description
*/
public function advance($step = 1, $description = ''): void {
if (is_null($this->progressBar)) {
$this->progressBar = new ProgressBar($this->output);
$this->progressBar->start();
}
$this->progressBar->advance($step);
if (!is_null($description)) {
$this->output->write(" $description");
}
}
public function finishProgress(): void {
if (is_null($this->progressBar)) {
return;
}
$this->progressBar->finish();
}
}
@@ -0,0 +1,82 @@
<?php
/**
* @copyright Copyright (c) 2017, ownCloud GmbH
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OC\Migration;
use OCP\Migration\IOutput;
use Psr\Log\LoggerInterface;
/**
* Class SimpleOutput
*
* Just a simple IOutput implementation with writes messages to the log file.
* Alternative implementations will write to the console or to the web ui (web update case)
*
* @package OC\Migration
*/
class SimpleOutput implements IOutput {
public function __construct(
private LoggerInterface $logger,
private $appName,
) {
}
public function debug(string $message): void {
$this->logger->debug($message, ['app' => $this->appName]);
}
/**
* @param string $message
* @since 9.1.0
*/
public function info($message): void {
$this->logger->info($message, ['app' => $this->appName]);
}
/**
* @param string $message
* @since 9.1.0
*/
public function warning($message): void {
$this->logger->warning($message, ['app' => $this->appName]);
}
/**
* @param int $max
* @since 9.1.0
*/
public function startProgress($max = 0): void {
}
/**
* @param int $step
* @param string $description
* @since 9.1.0
*/
public function advance($step = 1, $description = ''): void {
}
/**
* @since 9.1.0
*/
public function finishProgress(): void {
}
}