def post(self, message): if self._handle == 0: raise Exception('Queue has already been closed') if 'sid' in message: rules.queue_assert_event(self._handle, str(message['sid']), self._ruleset_name, json.dumps(message, ensure_ascii=False)) else: rules.queue_assert_event(self._handle, None, self._ruleset_name, json.dumps(message, ensure_ascii=False))
def post(self, message): if 'sid' in message: rules.queue_assert_event(self._handle, str(message['sid']), self._ruleset_name, json.dumps(message, ensure_ascii=False)) else: rules.queue_assert_event(self._handle, None, self._ruleset_name, json.dumps(message, ensure_ascii=False))
def queue_assert_event(self, sid, ruleset_name, message): if sid != None: sid = str(sid) rules.queue_assert_event(self._handle, sid, ruleset_name, json.dumps(message, ensure_ascii=False))
def queue_assert_event(self, sid, ruleset_name, message): rules.queue_assert_event(self._handle, str(sid), ruleset_name, json.dumps(message, ensure_ascii=False))
def post(self, message): rules.queue_assert_event(self._handle, str(message['sid']), self._ruleset_name, json.dumps(message))
def queue_assert_event(self, sid, ruleset_name, message): rules.queue_assert_event(self._handle, str(sid), ruleset_name, json.dumps(message))