2019-05-23 17:29:22 +02:00
|
|
|
<?php
|
2020-10-15 00:19:31 +02:00
|
|
|
|
2021-07-19 07:53:45 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2019-05-23 17:29:22 +02:00
|
|
|
namespace App\Message;
|
|
|
|
|
2021-07-21 23:45:22 +02:00
|
|
|
use App\MessageQueue\QueueManagerInterface;
|
2020-09-27 01:05:33 +02:00
|
|
|
|
|
|
|
class BackupMessage extends AbstractUniqueMessage
|
2019-05-23 17:29:22 +02:00
|
|
|
{
|
2020-11-10 04:06:48 +01:00
|
|
|
/** @var int|null The storage location to back up to. */
|
|
|
|
public ?int $storageLocationId = null;
|
|
|
|
|
2019-05-23 17:29:22 +02:00
|
|
|
/** @var string|null The absolute or relative path of the backup file. */
|
2020-11-10 04:06:48 +01:00
|
|
|
public ?string $path = null;
|
2019-05-23 17:29:22 +02:00
|
|
|
|
2020-03-08 23:49:48 +01:00
|
|
|
/** @var string|null The path to log output of the Backup command to. */
|
|
|
|
public ?string $outputPath = null;
|
|
|
|
|
2019-05-23 17:29:22 +02:00
|
|
|
/** @var bool Whether to exclude media, producing a much more compact backup. */
|
2020-03-08 23:49:48 +01:00
|
|
|
public bool $excludeMedia = false;
|
2020-09-27 01:05:33 +02:00
|
|
|
|
|
|
|
public function getIdentifier(): string
|
|
|
|
{
|
|
|
|
// The system should only ever be running one backup task at a given time.
|
|
|
|
return 'BackupMessage';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getTtl(): ?float
|
|
|
|
{
|
|
|
|
return 86400;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getQueue(): string
|
|
|
|
{
|
2021-07-21 23:45:22 +02:00
|
|
|
return QueueManagerInterface::QUEUE_LOW_PRIORITY;
|
2020-09-27 01:05:33 +02:00
|
|
|
}
|
2019-05-23 17:29:22 +02:00
|
|
|
}
|