title: Return values in celery tasks for after_return method
body: <p>I've got a chain of celery tasks and implemented each task as a class inheriting the Celery Task model.</p>
  
  <p>The Celery Task model has a <code>def run()</code> method that is required for the task to run.</p>
  
  <p>There is also the ability to have an <code>def after_return</code> method, which will automatically trigger after the task (the run method) has been ran and returned a value.</p>
  
  <p>One of the params in the <code>after_return</code> method is <code>retval</code>, which should be the return value of the <code>run</code> task. However, I cannot seem to get that to work.</p>
  
  <p>Example class (basic):</p>
  
  <pre><code>from celery.task import Task
  from utils import log as logging
  
  
  class Test(Task):
  
      name = "test.create"
      soft_time_limit = 60
      ignore_result = False
  
      def run(self, *args, **kwargs):    
          return 'test string'
  
      def after_return(self, status, retval, task_id, args, kwargs, einfo):
          logging.info("Return value of test task: %s" % retval)
  </code></pre>
  
  <p>In this case, <code>retval</code> should equal <code>test string</code>. Instead, it is None.</p>
  
  <p>Does anyone know if I am missing something simple?</p>