Skip to content
Snippets Groups Projects
Commit 4ed1e211 authored by Mitchell Moore's avatar Mitchell Moore
Browse files

complete base producer for ohpc/ood

parent 38ea871c
No related branches found
No related tags found
No related merge requests found
......@@ -58,11 +58,15 @@ def ingest_data(json, methods=['GET', 'POST']):
channel.exchange_declare(exchange='direct_logs', exchange_type='direct')
severity = sys.argv[1] if len(sys.argv) > 1 else 'info'
message = ' '.join(sys.argv[2:]) or 'Hello World!'
message = "Hey there" # todo: account info goes here
channel.basic_publish(
exchange='direct_logs', routing_key="ohpc", body=message)
print(" [x] Sent %r:%r" % ("ohpc", message))
channel.basic_publish(
exchange='direct_logs', routing_key=severity, body=message)
print(" [x] Sent %r:%r" % (severity, message))
exchange='direct_logs', routing_key="ood", body=message)
print(" [x] Sent %r:%r" % ("ood", message))
connection.close()
# Todo: Make the remaining portion of this method in a RabbitMQ consumer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment