Przeglądaj źródła

debug limit snapshots

andre 2 lat temu
rodzic
commit
62c93fa650
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      app/Services/Cloud/ResourceGuard.php

+ 6 - 1
app/Services/Cloud/ResourceGuard.php

@@ -116,10 +116,15 @@ class ResourceGuard
         //Files limit
         //Files limit
         $maxFiles = $this->getWhmcsConfigOption(ConfigurableOption::SNAPSHOTS, $this->configuration()->getSnapshotMaxFiles());
         $maxFiles = $this->getWhmcsConfigOption(ConfigurableOption::SNAPSHOTS, $this->configuration()->getSnapshotMaxFiles());
 
 
+        $testRepository = new SnapshotRepository();
+        $testRepository->setApi($this->api());
+        $testRepository->findByVmModel($cloudSerice->getVmModelWithVmid());
+        $testRepository->ignoreCurrent(true);
+
         logModuleCall(
         logModuleCall(
             'ProxmoxCloudVps',
             'ProxmoxCloudVps',
             __FUNCTION__,
             __FUNCTION__,
-            $this,
+            $testRepository->count(),
             'Debug',
             'Debug',
             $snapshotRepository->count()
             $snapshotRepository->count()
         );
         );