from celery import Celery # from backend.config import CELERY_RESULT_BACKEND, CELERY_BROKER_URL app = Celery( __name__, broker='amqp://stocks:5W3FcvqXnnp1vv04jf673Mf8EY@localhost/stocks_vhost', backend='rpc://', ) app.conf.broker_url = 'amqp://stocks:5W3FcvqXnnp1vv04jf673Mf8EY@localhost/stocks_vhost' app.conf.result_backend = 'rpc://' app.conf.update( worker_concurrency=8, worker_prefetch_multiplier=1, task_acks_late=True, broker_pool_limit=10, task_reject_on_worker_lost=True, task_publish_retry=True, broker_heartbeat=10 ) import background.tasks