Some refactor/testing and utility scripts

This commit is contained in:
Eldon 2014-01-22 18:03:02 +00:00
parent e0a2917b81
commit 4e38a142d4
4 changed files with 61 additions and 10 deletions

15
bin/load_url.py Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env python
from json import dumps, loads
import os,sys,argparse, urllib.request, urllib.error, urllib.parse
import websocket
import time
import uuid
import logging
import threading
from kombu import Connection, Exchange, Queue
logging.basicConfig(level=logging.INFO)
umbra_exchange = Exchange('umbra', 'direct', durable=True)
with Connection('amqp://guest:guest@localhost:5672//') as conn:
producer = conn.Producer(serializer='json')
producer.publish({'url': sys.argv[1]}, 'url', exchange=umbra_exchange)