parent
49d09e1952
commit
3c78984217
|
@ -127,21 +127,9 @@ class PartitionAssistantAction extends AbstractOgAgentController
|
|||
$this->entityManager->persist($client);
|
||||
$this->entityManager->flush();
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
$this->createService->__invoke($client, CommandTypes::PARTITION_AND_FORMAT, TraceStatus::IN_PROGRESS, $jobId, $data);
|
||||
=======
|
||||
if ($existingTrace) {
|
||||
$existingTrace->setStatus(TraceStatus::IN_PROGRESS);
|
||||
$existingTrace->setJobId($jobId);
|
||||
$existingTrace->setInput($data);
|
||||
$this->entityManager->persist($existingTrace);
|
||||
$this->entityManager->flush();
|
||||
} else {
|
||||
$this->createService->__invoke($client, CommandTypes::PARTITION_AND_FORMAT, TraceStatus::IN_PROGRESS, $jobId, $data);
|
||||
}
|
||||
|
||||
$clientJobs['/clients/' . $client->getUuid()] = $jobId;
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ class RunScriptAction extends AbstractOgAgentController
|
|||
*/
|
||||
public function __invoke(CommandExecuteInput $input): JsonResponse
|
||||
{
|
||||
$clientJobs = [];
|
||||
|
||||
/** @var Client $clientEntity */
|
||||
foreach ($input->clients as $clientEntity) {
|
||||
/** @var Client $client */
|
||||
|
@ -73,10 +75,8 @@ class RunScriptAction extends AbstractOgAgentController
|
|||
$this->logger->info('Powering off client', ['client' => $client->getId()]);
|
||||
|
||||
$jobId = $response['job_id'];
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
|
||||
$clientJobs[(string) '/clients/' . $client->getUuid()] = $jobId;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
$this->entityManager->persist($client);
|
||||
$this->entityManager->flush();
|
||||
|
@ -88,6 +88,6 @@ class RunScriptAction extends AbstractOgAgentController
|
|||
$this->createService->__invoke($client, CommandTypes::RUN_SCRIPT, TraceStatus::IN_PROGRESS, $jobId, $inputData);
|
||||
}
|
||||
|
||||
return new JsonResponse(data: [], status: Response::HTTP_OK);
|
||||
return new JsonResponse(data: $clientJobs, status: Response::HTTP_OK);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue