Skip to content

Instantly share code, notes, and snippets.

View regmicmahesh's full-sized avatar
😶‍🌫️
face_in_clouds.svg

Mahesh C. Regmi regmicmahesh

😶‍🌫️
face_in_clouds.svg
View GitHub Profile
package main
import (
"flag"
"log"
"net/http"
"os"
)
var folderToServe string
import pika
import logging
class Producer:
def __init__(self,host='localhost', exchanges=[], queues=[], conn_params=None):
self.queueNames = [ x.get('queue') for queue in queues ]
self.exchangeNames = [ x.get('exchange') for exchange in exchanges ]
if conn_params:
self.connection = pika.BlockingConnection(conn_params)