From 10b93e9873ba8b8b146c076cc463df2b2644fc7b Mon Sep 17 00:00:00 2001 From: Arnaud Fornerot Date: Fri, 26 Aug 2022 11:39:12 +0200 Subject: [PATCH] correctifs --- bin/messager.sh | 12 ++++++++++++ src/Service/ApiService.php | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 bin/messager.sh diff --git a/bin/messager.sh b/bin/messager.sh new file mode 100644 index 0000000..b27783f --- /dev/null +++ b/bin/messager.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +SERVICE="messager.sh" +pgrep -x "$SERVICE" >/tmp/messager.pid +NB=$(wc -l < /tmp/messager.pid) +if [ ${NB} -gt 1 ] +then + echo "$SERVICE is running" +else + echo "$SERVICE stopped" + /var/www/html/nineskeletor/bin/console messenger:consume async --memory-limit=512m --env=prod +fi \ No newline at end of file diff --git a/src/Service/ApiService.php b/src/Service/ApiService.php index 982596c..a7d199c 100644 --- a/src/Service/ApiService.php +++ b/src/Service/ApiService.php @@ -42,7 +42,8 @@ class ApiService \Unirest\Request::proxy($proxyHost, $proxyPort, CURLPROXY_HTTP, true); } - if($query) $query = \Unirest\Request\Body::json($query); + //if($query) $query = \Unirest\Request\Body::json($query); + if($query) $query = http_build_query($query); $response = false; switch($method) {