refs #952. First revision status endpoint ogAgent
testing/ogcore-api/pipeline/head Something is wrong with the build of this commit
Details
testing/ogcore-api/pipeline/head Something is wrong with the build of this commit
Details
parent
14ff759309
commit
756bea4844
|
@ -47,9 +47,15 @@ class StatusAction extends AbstractController
|
|||
try {
|
||||
$response = $this->httpClient->request('POST', 'https://'.$client->getIp().':8000/ogAdmClient/status');
|
||||
|
||||
if ($response->getStatusCode() !== Response::HTTP_OK) {
|
||||
$client->setStatus('off');
|
||||
$this->entityManager->persist($client);
|
||||
$this->entityManager->flush();
|
||||
} else if ($response->getStatusCode() === Response::HTTP_OK) {
|
||||
$client->setStatus('active');
|
||||
$this->entityManager->persist($client);
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue