andre 3 miesięcy temu
rodzic
commit
66bdb475d1
1 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 6
      app/Cron/BackupRemove.php

+ 6 - 6
app/Cron/BackupRemove.php

@@ -184,19 +184,19 @@ class BackupRemove extends Command
     private function proxmoxCloudVpsProcess($params){
     private function proxmoxCloudVpsProcess($params){
         $whmcsParams = di('whmcsParams');
         $whmcsParams = di('whmcsParams');
         $whmcsParams->setParams($params);
         $whmcsParams->setParams($params);
-        unset($this->vm, $this->api, $this->configuration);
-        $storage        = $this->configuration()->getBackupStorage() ? $this->configuration()->getBackupStorage() : 'local';
-        $fileRepository = new FileRepository();
-        $fileRepository->setApi($this->api());
 
 
                     logModuleCall(
                     logModuleCall(
                         'ProxmoxCloudVps',
                         'ProxmoxCloudVps',
                         __FUNCTION__,
                         __FUNCTION__,
-                        $this->configuration(),
+                        $this->configuration,
                         'Debug remove Backup Cron',
                         'Debug remove Backup Cron',
-                        $params['serviceid']
+                        $params
                     );
                     );
 
 
+        unset($this->vm, $this->api, $this->configuration);
+        $storage        = $this->configuration()->getBackupStorage() ? $this->configuration()->getBackupStorage() : 'local';
+        $fileRepository = new FileRepository();
+        $fileRepository->setApi($this->api());
         $fileRepository->findBackupByVmModel(VmModel::ofHostingId($params['serviceid'])->get())
         $fileRepository->findBackupByVmModel(VmModel::ofHostingId($params['serviceid'])->get())
                       ->findByStorages([$storage]);
                       ->findByStorages([$storage]);
         if($this->configuration()->getBackupStoreDays()){
         if($this->configuration()->getBackupStoreDays()){