public function delMessage($imageId) { $redis = DBConnect::getRedisServer(); $ret = $redis->lRem(KeyNamespace::FAILED_QUEUE, $imageId, 1); if (false == $ret) { print "failed to delete message from failed queue\n"; return false; } return true; }
public static function ackMessage($message) { $redis = DBConnect::getRedisServer(); $ret = $redis->lRem(KeyNamespace::UN_ACK_QUEUE, $message, 1); if (false == $ret) { print "failed to ackMessage\n"; return false; } return true; }
public static function getMessageQueueLen() { $redis = DBConnect::getRedisServer(); $ret = $redis->lSize(KeyNamespace::MESSAGE_QUEUE); if (false === $ret) { print "failed to get message list length \n"; return false; } return $ret; }