title: Getting task_id inside a Celery task
body: <p>This is probably a stupid question but its got me stumped coming from a Ruby background.</p>
  
  <p>I have an object that looks like this when I try to print it.</p>
  
  <pre><code>print celery.AsyncResult.task_id
  &gt;&gt;&gt;&lt;property object at 0x10c383838&gt;
  </code></pre>
  
  <p>I was expecting the actual value of the task_id property to be printed here. How do I get to the actual value?</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <pre><code>@celery.task
  def scan(host):
      print celery.AsyncResult.task_id
      cmd = 'ps -ef'
      cm = shlex.split(cmd)
      scan = subprocess.check_output(cm)
      return scan
  </code></pre>
  
  <p>Best Regards.</p>