mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
fix backups
This commit is contained in:
parent
64785c5ab6
commit
1eb5ed038d
2 changed files with 7 additions and 8 deletions
|
@ -30,8 +30,6 @@ class RunBackup extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
// TODO - Don't run backups parallel
|
||||
return;
|
||||
// Delete backups older than 7 days
|
||||
$findBackupsForDeleting = Backup::where('created_at', '<', now()->subDays(7))->get();
|
||||
foreach ($findBackupsForDeleting as $backup) {
|
||||
|
|
|
@ -31,9 +31,6 @@ class RunHostingSubscriptionsBackup extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
// TODO - Don't run backups parallel
|
||||
return;
|
||||
|
||||
// Delete backups older than 7 days
|
||||
$findBackupsForDeleting = HostingSubscriptionBackup::where('created_at', '<', now()->subDays(7))->get();
|
||||
foreach ($findBackupsForDeleting as $backup) {
|
||||
|
@ -67,9 +64,13 @@ class RunHostingSubscriptionsBackup extends Command
|
|||
->get();
|
||||
|
||||
if ($getPendingBackups->count() > 0) {
|
||||
foreach ($getPendingBackups as $pendingBackup) {
|
||||
$pendingBackup->startBackup();
|
||||
$this->info('Backup started.. ');
|
||||
if ($getPendingBackups->count() > 3) {
|
||||
$this->info('There are more than 3 pending backups. Please wait for them to finish.');
|
||||
} else {
|
||||
foreach ($getPendingBackups as $pendingBackup) {
|
||||
$pendingBackup->startBackup();
|
||||
$this->info('Backup started.. ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue