def handle(self, *args, **options): publish_message(options['queue'], **options['data'])
def test_publish_message(self): # Integration test, requires running nginx_push_stream docker box publish_message("foo", wtf="lol")
def message_received(request): if request.method != 'POST': return HttpResponseBadRequest() r = publish_message(QUEUE_ALL_USERS, **request.POST) return HttpResponse(r.read())
def publish(self, **message): return publish_message(self.queue_type + self.uuid, **message)