title: How to stop celery worker process
body: <p>I have a Django project on an Ubuntu EC2 node, which I have been using to set up an asynchronous using <code>Celery</code>. </p>
  
  <p>I am following <a href="http://michal.karzynski.pl/blog/2014/05/18/setting-up-an-asynchronous-task-queue-for-django-using-celery-redis/">this</a> along with the docs. </p>
  
  <p>I've been able to get a basic task working at the command line, using:</p>
  
  <pre><code>(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ celery --app=myproject.celery:app worker --loglevel=INFO
  </code></pre>
  
  <p>To start a worker. I have since made some changes to the Python, but realized that I need to restart a worker. </p>
  
  <p>From the command line, I've tried:</p>
  
  <pre><code> ps auxww | grep 'celery worker' | awk '{print $2}' | xargs kill -9
  </code></pre>
  
  <p>But I can see that the worker is still running. </p>
  
  <p>How can I kill it?</p>
  
  <p>edit:</p>
  
  <pre><code>(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ sudo ps auxww | grep celeryd | grep -v "grep" | awk '{print $2}' | sudo xargs kill -HUP
  kill: invalid argument H
  
  Usage:
   kill [options] &lt;pid&gt; [...]
  
  Options:
   &lt;pid&gt; [...]            send signal to every &lt;pid&gt; listed
   -&lt;signal&gt;, -s, --signal &lt;signal&gt;
                          specify the &lt;signal&gt; to be sent
   -l, --list=[&lt;signal&gt;]  list all signal names, or convert one to a name
   -L, --table            list all signal names in a nice table
  
   -h, --help     display this help and exit
   -V, --version  output version information and exit
  
  For more details see kill(1).
  </code></pre>
  
  <p>edit 2:</p>
  
  <pre><code>(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ ps aux|grep celery
  ubuntu    9756  0.0  3.4 100868 35508 pts/6    S+   15:49   0:07 /home/ubuntu/.virtualenvs/env1/bin/python3.4 /home/ubuntu/.virtualenvs/env1/bin/celery --app=tp.celery:app worker --loglevel=INFO
  ubuntu    9760  0.0  3.9 255840 39852 pts/6    S+   15:49   0:05 /home/ubuntu/.virtualenvs/env1/bin/python3.4 /home/ubuntu/.virtualenvs/env1/bin/celery --app=tp.celery:app worker --loglevel=INFO
  ubuntu   12760  0.0  0.0  10464   932 pts/7    S+   19:04   0:00 grep --color=auto celery
  </code></pre>