From c22068b8eacf50379a5752b82e306393f7ef0386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 3 Dec 2021 14:32:04 +0100 Subject: [PATCH 1/2] update client --- clients/V2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/V2 b/clients/V2 index 9a3f118..f1398e1 160000 --- a/clients/V2 +++ b/clients/V2 @@ -1 +1 @@ -Subproject commit 9a3f1188b42c4e5b1c3d7aca55aa200d45e15167 +Subproject commit f1398e1e1405ea1eba73aa3885e9f96de872954c From 28b04252ea02012cbe66b17bd9f12d53483163ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 3 Dec 2021 14:36:12 +0100 Subject: [PATCH 2/2] add LdcWebStatusChecker --- app/Console/Commands/LdcWebStatusChecker.php | 78 ++++++++++++++++++++ config/ldcweb.php | 5 ++ 2 files changed, 83 insertions(+) create mode 100644 app/Console/Commands/LdcWebStatusChecker.php create mode 100644 config/ldcweb.php diff --git a/app/Console/Commands/LdcWebStatusChecker.php b/app/Console/Commands/LdcWebStatusChecker.php new file mode 100644 index 0000000..563db63 --- /dev/null +++ b/app/Console/Commands/LdcWebStatusChecker.php @@ -0,0 +1,78 @@ + 0) { + foreach ($files as $file) { + $data['logs'] = $data['logs'] + filesize($file); + } + } + + $data['code']['version'] = app()->version(); + + // Send by cURL + $url = 'https://ldc-web.ldc.fr/api/status-checker'; + $ch = curl_init($url); + $payload = ['token' => 'CE8S52Qq7stf5k8frF4T', 'datas' => json_encode($data)]; + curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch); + curl_close($ch); + return 0; + } +} diff --git a/config/ldcweb.php b/config/ldcweb.php new file mode 100644 index 0000000..7c62d71 --- /dev/null +++ b/config/ldcweb.php @@ -0,0 +1,5 @@ + env('PROJECT_UUID') +];