Update ProcessHostingSubscriptionBackup.php

This commit is contained in:
Bozhidar 2024-05-07 16:50:11 +03:00
parent b77f0ad0ff
commit 6e18fb4513

View file

@ -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();