Skip to content

ImportError: No module named backend #40

@hoyeunglee

Description

@hoyeunglee

when try the example
got error

consumer.py

from carrot.messaging import Consumer
from carrot.connection import BrokerConnection

conn = BrokerConnection(hostname="localhost", port=5672,
                        userid="test", password="test",
                        virtual_host="test")
consumer = Consumer(connection=conn, queue="feed",exchange="feed", routing_key="importer")

def import_feed_callback(message_data, message):
     feed_url = message_data["import_feed"]
     print("Got feed import message for: %s" % feed_url)
     # something importing this feed url
     # import_feed(feed_url)
     message.ack()

consumer.register_callback(import_feed_callback)
consumer.wait() # Go into the consumer loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions