def whois_push(**whois_recv_info):
global channel_whois
# print 'whois push:', whois_recv_info
result = ''
try:
result = json.dumps(whois_recv_info)
except UnicodeDecodeError:
for key in whois_recv_info.keys():
if type(whois_recv_info[key]) == str:
whois_recv_info[key] = whois_recv_info[key].decode('latin-1').encode("utf-8")
result = json.dumps(whois_recv_info)
if result != '':
channel_whois.basic_publish(
exchange='',
routing_key='whois_queue',
body=json.dumps(result),
properties=pika.BasicProperties(
delivery_mode=2)
)
# ????com_manage???????whois??????xxx?????????????
评论列表
文章目录