|
@@ -115,20 +115,6 @@ 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());
|
|
|
-
|
|
|
|
|
- $testRepository = new SnapshotRepository();
|
|
|
|
|
- $testRepository->setApi($this->api());
|
|
|
|
|
- $testRepository->findByVmModel($cloudSerice->getVmModelWithVmid());
|
|
|
|
|
- $testRepository->ignoreCurrent(true);
|
|
|
|
|
-
|
|
|
|
|
- logModuleCall(
|
|
|
|
|
- 'ProxmoxCloudVps',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $testRepository,
|
|
|
|
|
- '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."));
|