Merge pull request #2934 from zKoz210/patch-3

Fix retry after header
This commit is contained in:
Dane Everitt 2020-12-29 15:46:24 -08:00 committed by GitHub
commit 32d99c98ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ class InitiateBackupService
$previous = $this->repository->getBackupsGeneratedDuringTimespan($server->id, $period);
if ($previous->count() >= $limit) {
throw new TooManyRequestsHttpException(
CarbonImmutable::now()->diffInSeconds($previous->last()->created_at->addMinutes(10)),
CarbonImmutable::now()->diffInSeconds($previous->last()->created_at->addSeconds($period)),
sprintf('Only %d backups may be generated within a %d second span of time.', $limit, $period)
);
}