Fix simple sms api + add wait on system v queue (see to improve that later)
This commit is contained in:
parent
473fb297f3
commit
04b0f1267a
|
@ -327,7 +327,18 @@ namespace controllers\publics;
|
|||
}
|
||||
$at = (new \DateTime())->format('Y-m-d H:i:s');
|
||||
|
||||
$scheduled_id = $this->internal_scheduled->create($this->user['id'], $at, $text, $id_phone);
|
||||
|
||||
$scheduled_id = $this->internal_scheduled->create(
|
||||
$this->user['id'],
|
||||
$at,
|
||||
$text,
|
||||
$id_phone,
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
[['number' => $to, 'data' => '[]']]
|
||||
);
|
||||
if (!$scheduled_id)
|
||||
{
|
||||
$return = self::DEFAULT_RETURN;
|
||||
|
|
|
@ -70,7 +70,7 @@ class SystemVQueue implements Queue
|
|||
|
||||
$this->get_queue();
|
||||
$error_code = null;
|
||||
$success = msg_send($this->queue, $tag, $message, true, false, $error_code);
|
||||
$success = msg_send($this->queue, $tag, $message, true, true, $error_code);
|
||||
if (!$success)
|
||||
{
|
||||
throw new \Exception('Impossible to send the message on system V queue, error code : ' . $error_code);
|
||||
|
|
Loading…
Reference in New Issue