From 6e18fb451353e2dabeeb4fadada9bce058abd97d Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Tue, 7 May 2024 16:50:11 +0300 Subject: [PATCH] Update ProcessHostingSubscriptionBackup.php --- web/app/Jobs/ProcessHostingSubscriptionBackup.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/app/Jobs/ProcessHostingSubscriptionBackup.php b/web/app/Jobs/ProcessHostingSubscriptionBackup.php index 4a646ba..1b8afa5 100644 --- a/web/app/Jobs/ProcessHostingSubscriptionBackup.php +++ b/web/app/Jobs/ProcessHostingSubscriptionBackup.php @@ -36,6 +36,10 @@ class ProcessHostingSubscriptionBackup implements ShouldQueue $findHostingSubscriptionBackup = HostingSubscriptionBackup::where('id', $this->id)->first(); if ($findHostingSubscriptionBackup) { + if ($findHostingSubscriptionBackup->status == BackupStatus::Pending) { + $findHostingSubscriptionBackup->startBackup(); + } + for ($i = 0; $i < 200; $i++) { echo "Check: ".$i." | Checking backup status...\n"; $findHostingSubscriptionBackup->checkBackup();