mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
s3 backups: handle CompleteMultipartUpload and AbortMultipartUpload on the panel instead of in wings, add BACKUP_PRESIGNED_URL_LIFESPAN environment variable
This commit is contained in:
@@ -99,6 +99,8 @@ class InitiateBackupService
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param string|null $name
|
||||
* @param bool $override
|
||||
*
|
||||
* @return \Pterodactyl\Models\Backup
|
||||
*
|
||||
* @throws \Throwable
|
||||
@@ -107,13 +109,13 @@ class InitiateBackupService
|
||||
*/
|
||||
public function handle(Server $server, string $name = null, bool $override = false): Backup
|
||||
{
|
||||
$previous = $this->repository->getBackupsGeneratedDuringTimespan($server->id, 10);
|
||||
/*$previous = $this->repository->getBackupsGeneratedDuringTimespan($server->id, 10);
|
||||
if ($previous->count() >= 2) {
|
||||
throw new TooManyRequestsHttpException(
|
||||
CarbonImmutable::now()->diffInSeconds($previous->last()->created_at->addMinutes(10)),
|
||||
'Only two backups may be generated within a 10 minute span of time.'
|
||||
);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Check if the server has reached or exceeded it's backup limit
|
||||
if (!$server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {
|
||||
|
||||
Reference in New Issue
Block a user