mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
All working reception and sending with webhook. Commands still to test. Update test adapter to use local files
This commit is contained in:
parent
b5a36b1169
commit
768714cc1a
7 changed files with 80 additions and 23 deletions
|
@ -39,15 +39,20 @@ class Webhook extends AbstractDaemon
|
|||
|
||||
public function run()
|
||||
{
|
||||
//Call message
|
||||
$msgtype = null;
|
||||
$maxsize = 409600;
|
||||
$message = null;
|
||||
|
||||
$find_message = true;
|
||||
while ($find_message)
|
||||
{
|
||||
msg_receive($this->webhook_queue, QUEUE_ID_WEBHOOK, $msgtype, $maxsize, $message);
|
||||
//Call message
|
||||
$msgtype = null;
|
||||
$maxsize = 409600;
|
||||
$message = null;
|
||||
|
||||
$error_code = null;
|
||||
$success = msg_receive($this->webhook_queue, QUEUE_TYPE_WEBHOOK, $msgtype, $maxsize, $message, true, 0, $error_code);
|
||||
if (!$success)
|
||||
{
|
||||
$this->logger->critical('Error for webhook queue reading, error code : ' . $error_code);
|
||||
}
|
||||
|
||||
if (!$message)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue