def _task_info_get(context, task_id, session=None):
 session = (session or get_session())
 query = session.query(models.TaskInfo)
 query = query.filter_by(task_id=task_id)
 try:
  task_info_ref = query.one()
 except sa_orm.exc.NoResultFound:
  LOG.debug('TaskInfo was not found for task with id %(task_id)s', {'task_id': task_id})
  task_info_ref = None
 return task_info_ref

def _task_info_get ( context , task_id , session = None ) : session = ( session or get_session ( ) ) query = session . query ( models . TaskInfo ) query = query . filter_by ( task_id = task_id ) try : task_info_ref = query . one ( ) except sa_orm . exc . NoResultFound : LOG . debug ( 'TaskInfo was not found for task with id %(task_id)s' , { 'task_id' : task_id } ) task_info_ref = None return task_info_ref
get task info for task with given task id .