title: Terminating task in celery 3.1.18
body: <p>I have a django app with some celery tasks, I'm staring worker with</p>
  
  <pre><code>celery -A myapp worker --loglevel=INFO --concurrency=10
  </code></pre>
  
  <p>I run task with <code>task.deploy()</code>, but when I try to terminate task with <code>celery.task.control.revoke(task_id, terminate=True)</code></p>
  
  <p>I'm getting</p>
  
  <pre><code>[2015-07-27 14:27:04,736: ERROR/MainProcess] Task task[80e06e87-f254-4c0b-bea5-5c21540777ab] raised unexpected: Terminated(15,)
  Traceback (most recent call last):
    File "/home/blake/projects/venv/myapp/lib/python2.7/site-packages/billiard/pool.py", line 1674, in _set_terminated
      raise Terminated(-(signum or 0))
  Terminated: 15
  </code></pre>
  
  <p>I was looking for post about this error, but I have only found 3 years old post which didn't help me at all.</p>
  
  <p>I'm using </p>
  
  <pre><code>celery==3.1.18
  kombu==3.0.25
  billiard==3.3.0.20
  </code></pre>
  
  <p>So how do I successfully terminate an already running task?</p>
  
  <p>EDIT: Task is however being terminated but code stops executing because of exception and somehow except is not catching Exception</p>
  
  <pre><code>try:
      revoke(task_id, terminate=True)
  except Terminated:
      pass
  </code></pre>