def resource_status_show(context, data_dict):
 _check_access('resource_status_show', context, data_dict)
 try:
  import ckan.lib.celery_app as celery_app
 except ImportError:
  return {'message': 'queue is not installed on this instance'}
 model = context['model']
 id = _get_or_bust(data_dict, 'id')
 q = _text("\n        select status, date_done, traceback, task_status.*\n        from task_status left join celery_taskmeta\n        on task_status.value = celery_taskmeta.task_id\n           and key = 'celery_task_id'\n        where entity_id = :entity_id\n    ")
 try:
  result = model.Session.connection().execute(q, entity_id=id)
 except sqlalchemy.exc.ProgrammingError:
  return {'message': 'queue tables not installed on this instance'}
 result_list = [_table_dictize(row, context) for row in result]
 return result_list

def resource_status_show ( context , data_dict ) : _check_access ( 'resource_status_show' , context , data_dict ) try : import ckan . lib . celery_app as celery_app except ImportError : return { 'message' : 'queue is not installed on this instance' } model = context [ 'model' ] id = _get_or_bust ( data_dict , 'id' ) q = _text ( "\n        select status, date_done, traceback, task_status.*\n        from task_status left join celery_taskmeta\n        on task_status.value = celery_taskmeta.task_id\n           and key = 'celery_task_id'\n        where entity_id = :entity_id\n    " ) try : result = model . Session . connection ( ) . execute ( q , entity_id = id ) except sqlalchemy . exc . ProgrammingError : return { 'message' : 'queue tables not installed on this instance' } result_list = [ _table_dictize ( row , context ) for row in result ] return result_list
return the statuses of a resources tasks .