title: Cannot connect to amqp://guest:**@127.0.0.1:5672//:
body: <p>I want to create a progress bar for one of my functions. I call this function in views. I research and find that I should use Celery to make a progress bar. (I am doing some download processes and the user should track it)</p>
  <p>I found a tutorial and try to do the same but I get an error:</p>
  <blockquote>
  <p>Cannot connect to amqp://guest:**@127.0.0.1:5672//: [WinError 10061]
  When target machine actively rejects n connection failed.</p>
  </blockquote>
  <p>I am developing this app in localhost and I am using sqlite for db. Where is my mistake and what should I do?</p>
  <p><strong>settings.py</strong></p>
  <pre><code>...
  CELERY_ACCEPT_CONTENT = ['json']
  CELERY_TASK_SERIALIZER = 'json'
  CELERY_RESULT_BACKEND = 'django-db'
  CELERY_BROKER_URL = '127.0.0.1'
  </code></pre>
  <p><strong>functions.py</strong></p>
  <pre><code>class myFunction():
   def __init__(self, user, password, url, port, db_password, username):
      ....
   @shared_task(bind=True)
   def send_download(self):
       progress_recorder = ProgressRecorder(self)
       for in_file in glob.glob(self.location + &quot;\*\*.xyz&quot;):
              try:
                  i = 0
                  progress_recorder.set_progress(i+1, len(array), f'On iteration {i}')
  
                  with open(in_file) as f:
                      if os.path.getsize(in_file) &gt; 0:
                          ... function...
                          time.sleep(0.02)
                  i = i + 1
              except:
                  pass
      ....
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>...
  task = (functions.myFunction(setup.username, setup.password,
                                           setup.url, setup.port, setup.db_password,
                                           username=request.user.username))
  </code></pre>