Skip to content

Commit 1ce6d3b

Browse files
committed
Maybe we should keep that backup rate-limit
1 parent a5cebd6 commit 1ce6d3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Services/Backups/InitiateBackupService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ public function setIgnoredFiles(?array $ignored)
109109
*/
110110
public function handle(Server $server, string $name = null, bool $override = false): Backup
111111
{
112-
/*$previous = $this->repository->getBackupsGeneratedDuringTimespan($server->id, 10);
112+
$previous = $this->repository->getBackupsGeneratedDuringTimespan($server->id, 10);
113113
if ($previous->count() >= 2) {
114114
throw new TooManyRequestsHttpException(
115115
CarbonImmutable::now()->diffInSeconds($previous->last()->created_at->addMinutes(10)),
116116
'Only two backups may be generated within a 10 minute span of time.'
117117
);
118-
}*/
118+
}
119119

120120
// Check if the server has reached or exceeded it's backup limit
121121
if (!$server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {

0 commit comments

Comments
 (0)