title: How should I handle working with celeryd_multi from code?
body: <p>So far, I've been working only with <code>python manage.py celeryd</code>, starting it like this:</p>
  
  <p><code>python manage.py celeryd -l info --settings=settings</code></p>
  
  <p>The code from my view, does this:</p>
  
  <pre><code>BinaryExecTask.delay(request.POST["binary_path"])
  </code></pre>
  
  <p>And the code from my <code>settings.py</code>, is this:</p>
  
  <pre><code>import djcelery
  djcelery.setup_loader()
  
  BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
  #celery
  BROKER_HOST = "localhost"
  BROKER_PORT = 5672
  BROKER_USER = "guest"
  BROKER_PASSWORD = "guest"
  BROKER_VHOST = "/"
  </code></pre>
  
  <p>and it will execute some binaries in the background. The thing is, some of the binaries take pretty short time to run, while others may take up to half an hour. Working with <code>celeryd</code>, all my tasks are blocked until the current one finishes it's execution. I saw <a href="http://ask.github.com/celery/reference/celery.bin.celeryd_multi.html#examples" rel="nofollow">here</a> some examples of starting celeryd_multi, but running:</p>
  
  <p><code>python manage.py celeryd_multi start 3 --settings=settings -l info</code></p>
  
  <p>gives this error:</p>
  
  <pre><code>celeryd-multi v2.3.1
  &gt; Starting nodes...
          &gt; celery1.x: Traceback (most recent call last):
    File "manage.py", line 14, in &lt;module&gt;
      execute_manager(settings)
    File "c:\code\python27\lib\site-packages\django-1.3-py2.7.egg\django\core\management\_
   line 438, in execute_manager
      utility.execute()
    File "c:\code\python27\lib\site-packages\django-1.3-py2.7.egg\django\core\management\_
   line 379, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "c:\code\python27\lib\site-packages\django_celery-2.3.3-py2.7.egg\djcelery\manage
  s\celeryd_multi.py", line 22, in run_from_argv
      ["%s %s" % (argv[0], argv[1])] + argv[2:])
    File "c:\code\python27\lib\site-packages\celery-2.3.1-py2.7.egg\celery\bin\celeryd_mul
   172, in execute_from_commandline
      self.commands[argv[0]](argv[1:], cmd)
    File "c:\code\python27\lib\site-packages\celery-2.3.1-py2.7.egg\celery\bin\celeryd_mul
   205, in start
      retcode = self.waitexec(argv)
    File "c:\code\python27\lib\site-packages\celery-2.3.1-py2.7.egg\celery\bin\celeryd_mul
   354, in waitexec
      pipe = Popen(argstr, env=self.env)
    File "c:\code\python27\lib\subprocess.py", line 672, in __init__
      errread, errwrite)
    File "c:\code\python27\lib\subprocess.py", line 882, in _execute_child
      startupinfo)
  WindowsError: [Error 2] The system cannot find the file specified
  </code></pre>
  
  <p>The <code>celeryd-multi start 3 -c 3</code> throws the same error. What should I do so that I could succesfully start a celery instance that will allow me to run more tasks in parallel? Also, would I need to do something different in my view?</p>
  
  <p>EDIT: some debugging led me here ( site-packages\celery-2.3.1-py2.7.egg\celery\bin\celeryd_multi.py(354)waitexec )</p>
  
  <pre><code>351         def waitexec(self, argv, path=sys.executable):
  352             args = " ".join([path] + list(argv))
  353  -&gt;         argstr = shlex.split(args.encode("utf-8"))
  354             pipe = Popen(argstr, env=self.env)
  (Pdb) p argstr
  ['c:codepython27python.exe', 'manage.py', 'celeryd_detach', '-l', 'info', '--pidfile=celeryd@1.pid',
   '-n', 'celery1.x', '--logfile=celeryd@1.log']
  (Pdb) p Popen(argstr, env=self.env)
  *** WindowsError: WindowsError(2, 'The system cannot find the file specified')
  (Pdb)
  </code></pre>
  
  <p>So, as we can see, the path to Python gets destroyed :). What should I do next?</p>
  
  <p>EDIT2: I opened an issue <a href="https://github.com/ask/celery/issues/472" rel="nofollow">here</a></p>