diff --git a/src/Service/MQTTClient.php b/src/Service/MQTTClient.php index 23a0f140..fe27cd64 100644 --- a/src/Service/MQTTClient.php +++ b/src/Service/MQTTClient.php @@ -37,7 +37,10 @@ class MQTTClient $sessions = $job_order->getCustomer()->getMobileSessions(); if (count($sessions) == 0) + { + error_log("no sessions to send mqtt event to"); return; + { // send to every customer session foreach ($sessions as $sess) @@ -45,6 +48,8 @@ class MQTTClient $phone_num = $sess->getPhoneNumber(); $channel = self::PREFIX . $phone_num; $this->publish($channel, json_encode($payload)); + + error_log("sent to $channel"); } }