title: Get started with celery and rabbitmq using python
body: <p>i have two files task1.py and task2.py where i have defined two functions and it is stored in a linux server. 
  The first file is</p>
  
  <pre><code>from celery import Celery
  import sys
  app = Celery('task1',backend='amqp://' ,broker='amqp://')
  
  @app.task
  def get_sum():
          try:
                  a = 3
                  b = 3
                  c = a + b
                  return c
          except:
                  return sys.exc_info()[0]
  </code></pre>
  
  <p>The second file is</p>
  
  <pre><code> from celery import Celery
      import sys
      app = Celery('task2',backend='amqp://' ,broker='amqp://')
  
      @app.task
      def get_product():
              try:
                      a = 3
                      b = 3
                      c = a * b
                      return c
              except:
                      return sys.exc_info()[0]
  </code></pre>
  
  <p>I have called this task1 and and task2 in 2 other files as</p>
  
  <pre><code>from task1 import get_sum
  from celery.exceptions import TimeoutError
  result = get_sum.delay()
  try:
          print result.get()
  except:
          print result.state
  </code></pre>
  
  <p>I am able to initiate a single worker and run the file but when i define multiple workers and run the single file all the worker process stop. 
  I tried using this command</p>
  
  <pre><code>celery multi start 3 -c 3
  celery worker -n celery1@myhost -c 3
  celery worker -n celery2@myhost -c 3
  celery worker -n celery3@myhost -c 3
  </code></pre>
  
  <p>I know i m doing it wrong. Can some one guide me how to initiate multiple workers and run multiple files at the same time.</p>
  
  <p>Thanks in advance</p>