diff --git a/src/Command/ChargeExampleTraceCommand.php b/src/Command/ChargeExampleTraceCommand.php new file mode 100644 index 0000000..f8c9096 --- /dev/null +++ b/src/Command/ChargeExampleTraceCommand.php @@ -0,0 +1,52 @@ +entityManager->getRepository(Client::class)->findAll(); + $traces = TraceStatus::getStatusKeys(); + + var_dump($traces); + + + foreach ($clients as $client) { + foreach ($traces as $traceStatus) { + $trace = new Trace(); + $trace->setClient($client); + $trace->setJobId('CreateAuxiliarFiles_' . $client->getId()); + $trace->setStatus($traceStatus); + $trace->setCommand(CommandTypes::CREATE_IMAGE_AUX_FILE); + $trace->setExecutedAt(new \DateTime()); + $this->entityManager->persist($trace); + } + } + + $this->entityManager->flush(); + + return 1; + } +}