def save(self): channel = self.validated_data['channel'] message = self.validated_data['message'] delivered_count=RedisService.publish_message(channel, message) RedisService.websocket_publish_message(channel,message) self.validated_data['delivered_count']=delivered_count
def send_task_enqueue_message(): RedisService.websocket_publish_message("TASKSTATUSCHANGE", 'Task enqueue now!')