andre пре 2 година
родитељ
комит
f65acda950
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      app/Services/Cloud/ResourceGuard.php

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

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