'Get status task by ID'

@etag
@api.response(200, model=task_status)
@api.response(NotFoundError)
def get(self, task_id, session=None):

    try:
        task = session.query(StatusTask).filter((StatusTask.id == task_id)).one()
    except NoResultFound:
        raise NotFoundError((u'task    status    with    id    %d    not    found' % task_id))
    args = tasks_parser.parse_args()
    include_execution = args.get(u'include_execution')
    st_task = task.to_dict()
    if include_execution:
        execution = task.executions.order_by(TaskExecution.start.desc()).first()
        st_task[u'last_execution'] = (execution.to_dict() if execution else {})
    return jsonify(st_task)
