title: Attributes of Celery Tasks
body: <p>Does celery purge/fail to copy instance variables when a task is handled by delay?</p>
  
  <pre><code>class MyContext(object):
      a = 1
  
  
  class MyTask(Task):
      def run(self):
          print self.context.a
  
  from tasks import MyTask, MyContext
  c = MyContext()
  t = MyTask()
  t.context = c
  print t.context.a
  #Shows 1
  t.delay()
  
  =====Worker Output
  Task tasks.MyTask[d30e1c37-d094-4809-9f72-89ff37b81a85] 
  raised exception: AttributeError("'NoneType' object has no attribute 'a'",)
  </code></pre>
  
  <p>It looks like this has been asked before <a href="https://stackoverflow.com/questions/17068283/celery-task-function-custom-attributes">here</a>, but I do not see an answer.</p>