'Get task meta-data for a task by id.'

def _get_task_meta_for(self, task_id):

    self._get_connection()
    res = self._session.execute(self._read_stmt, (task_id,))
    if (not res):
        return {u'status': states.PENDING, u'result': None}
    (status, result, date_done, traceback, children) = res[0]
    return self.meta_from_decoded({u'task_id': task_id, u'status': status, u'result': self.decode(result), u'date_done': date_done.strftime(u'%Y-%m-%dT%H:%M:%SZ'), u'traceback': self.decode(traceback), u'children': self.decode(children)})
