Browse Source

debug limit snapshots

andre 2 years ago
parent
commit
d280eb14a8
1 changed files with 9 additions and 0 deletions
  1. 9 0
      app/Services/Cloud/ResourceGuard.php

+ 9 - 0
app/Services/Cloud/ResourceGuard.php

@@ -115,6 +115,15 @@ class ResourceGuard
         $snapshotRepository->ignoreCurrent(true);
         $snapshotRepository->ignoreCurrent(true);
         //Files limit
         //Files limit
         $maxFiles = $this->getWhmcsConfigOption(ConfigurableOption::SNAPSHOTS, $this->configuration()->getSnapshotMaxFiles());
         $maxFiles = $this->getWhmcsConfigOption(ConfigurableOption::SNAPSHOTS, $this->configuration()->getSnapshotMaxFiles());
+
+        logModuleCall(
+            'ProxmoxCloudVps',
+            __FUNCTION__,
+            $maxFiles,
+            'Debug',
+            $snapshotRepository->count()
+        );
+
         if ($maxFiles != "-1" && $snapshotRepository->count() >= $maxFiles)
         if ($maxFiles != "-1" && $snapshotRepository->count() >= $maxFiles)
         {
         {
             throw new \Exception(sl("lang")->tr("The maximum number of snapshots has been exceeded. Please remove the old snapshots."));
             throw new \Exception(sl("lang")->tr("The maximum number of snapshots has been exceeded. Please remove the old snapshots."));