Compare commits
No commits in common. "1c13c8fe7d14b1a9d672e0354c309e32e9e9abc0" and "d11e6e0873edcbf4c74cf3f2b6d212b402bec37d" have entirely different histories.
1c13c8fe7d
...
d11e6e0873
|
@ -18,10 +18,6 @@ class CreatePartitionService
|
|||
public function __invoke(array $data, Client $clientEntity): void
|
||||
{
|
||||
foreach ($data['cfg'] as $cfg) {
|
||||
if (!isset($cfg['disk'], $cfg['par'], $cfg['tam'], $cfg['uso'], $cfg['fsi'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$partitionEntity = $this->entityManager->getRepository(Partition::class)
|
||||
->findOneBy(['client' => $clientEntity, 'diskNumber' => $cfg['disk'], 'partitionNumber' => $cfg['par']]);
|
||||
|
||||
|
@ -45,7 +41,6 @@ class CreatePartitionService
|
|||
$partitionEntity->setDiskNumber($cfg['disk']);
|
||||
$partitionEntity->setPartitionNumber($cfg['par']);
|
||||
$partitionEntity->setSize($cfg['tam']);
|
||||
$partitionEntity->setFilesystem($cfg['fsi']);
|
||||
$partitionEntity->setMemoryUsage(((int) $cfg['uso']) * 100);
|
||||
$this->entityManager->persist($partitionEntity);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue