def notify(message): """Sends a notification to the RabbitMQ""" context = nova.context.get_admin_context() priority = message.get('priority', FLAGS.default_notification_level) priority = priority.lower() topic = '%s.%s' % (FLAGS.notification_topic, priority) rpc.notify(context, topic, message)
def notify(message): """Sends a notification to the RabbitMQ""" context = nova.context.get_admin_context() priority = message.get('priority', FLAGS.default_notification_level) priority = priority.lower() for topic in FLAGS.notification_topics: topic = '%s.%s' % (topic, priority) try: rpc.notify(context, topic, message) except Exception, e: LOG.exception(_("Could not send notification to %(topic)s. " "Payload=%(message)s" % locals()))
def notify(message): """Sends a notification to the RabbitMQ""" context = nova.context.get_admin_context() priority = message.get('priority', FLAGS.default_notification_level) priority = priority.lower() for topic in FLAGS.notification_topics: topic = '%s.%s' % (topic, priority) try: rpc.notify(context, topic, message) except Exception, e: LOG.exception( _("Could not send notification to %(topic)s. " "Payload=%(message)s" % locals()))