def _task_broker_factory(dispatch_func = None): connection = Connection(vhost = "/", host = "localhost", port = 5672, username = "******", password = "******") connection.connect() task_broker = TaskBroker(connection, _get_properties()) if dispatch_func: task_broker._dispatch = dispatch_func task_broker._init_connection() return task_broker
def _task_broker_factory(dispatch_func=None): connection = Connection(vhost="/", host="localhost", port=5672, username="******", password="******") connection.connect() task_broker = TaskBroker(connection, _get_properties()) if dispatch_func: task_broker._dispatch = dispatch_func task_broker._init_connection() return task_broker