refs #2769. Some improvements
parent
1d6c0a8696
commit
2ae98d7af5
|
|
@ -79,6 +79,12 @@ class ExecutePendingTracesCommand extends Command
|
|||
|
||||
foreach ($traces as $trace) {
|
||||
try {
|
||||
$client = $trace->getClient();
|
||||
|
||||
if ($client->getStatus() === ClientStatus::BUSY) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$io->info("Processing trace {$trace->getUuid()} with command: {$trace->getCommand()}");
|
||||
|
||||
$result = $this->executeTrace($trace);
|
||||
|
|
@ -126,10 +132,6 @@ class ExecutePendingTracesCommand extends Command
|
|||
throw new \Exception("No client associated with trace");
|
||||
}
|
||||
|
||||
if ($client->getStatus() === ClientStatus::BUSY) {
|
||||
throw new \Exception("Client is busy");
|
||||
}
|
||||
|
||||
$trace->setExecutedAt(new \DateTime());
|
||||
$this->entityManager->persist($trace);
|
||||
$this->entityManager->flush();
|
||||
|
|
|
|||
Loading…
Reference in New Issue