title: Using requests library in on_failure or on_sucesss hook causes the task to retry indefinitely
body: <p>This is what I have:</p>
  
  <pre><code>import youtube_dl # in case this matters
  
  class ErrorCatchingTask(Task):
      # Request = CustomRequest
      def on_failure(self, exc, task_id, args, kwargs, einfo):
          # If I comment this out, all is well
          r = requests.post(server + "/error_status/") 
          ....
  
  @app.task(base=ErrorCatchingTask, bind=True, ignore_result=True, max_retires=1)
  def process(self, param_1, param_2, param_3):
      ...
      raise IndexError
      ...
  </code></pre>
  
  <p>The worker will throw exception and then seemingly spawn a new task with a different task id <code>Received task: process[{task_id}</code>
  Here are a couple of things I've tried:</p>
  
  <ul>
  <li>Importing <code>from celery.worker.request import Request</code> and overriding <code>on_failure</code> and <code>on_success</code> functions there instead.</li>
  <li><code>app.conf.broker_transport_options = {'visibility_timeout': 99999999999}</code></li>
  <li><code>@app.task(base=ErrorCatchingTask, bind=True, ignore_result=True, max_retires=1)</code></li>
  <li>Turn off <code>DEBUG</code> mode</li>
  <li>Set logging to <code>info</code></li>
  <li>Set <code>CELERY_IGNORE_RESULT</code> to false (<a href="https://stackoverflow.com/questions/13963260/can-i-use-python-requests-with-celery">Can I use Python requests with celery?</a>)</li>
  <li><code>import requests as apicall</code> to rule out namespace conflict</li>
  <li>Money patch <code>requests</code> <a href="https://stackoverflow.com/questions/28315657/celery-eventlet-non-blocking-requests">Celery + Eventlet + non blocking requests</a></li>
  <li>Move <code>ErrorCatchingTask</code> into a separate file</li>
  </ul>
  
  <p>If I don't use any of the hook functions, the worker will just throw the exception and stay idle until the next task is scheduled, which what I expect even when I use the hooks. Is this a bug? I searched through and through on github issues, but couldn't find the same problem. How do you debug a problem like this?</p>
  
  <p>Django 1.11.16
  celery 4.2.1</p>