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

@retry
def _get_task_meta_for(self, task_id):

    session = self.ResultSession()
    with session_cleanup(session):
        task = list(session.query(Task).filter((Task.task_id == task_id)))
        task = (task and task[0])
        if (not task):
            task = Task(task_id)
            task.status = states.PENDING
            task.result = None
        return self.meta_from_decoded(task.to_dict())
