当前位置: 首页>>代码示例>>Python>>正文


Python queries.StampedeWorkflowQueries类代码示例

本文整理汇总了Python中Pegasus.service.monitoring.queries.StampedeWorkflowQueries的典型用法代码示例。如果您正苦于以下问题:Python StampedeWorkflowQueries类的具体用法?Python StampedeWorkflowQueries怎么用?Python StampedeWorkflowQueries使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了StampedeWorkflowQueries类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_task_meta

def get_task_meta(username, m_wf_id, wf_id, task_id):
    """
    Returns a collection of task's metadata.

    :query int start-index: Return results starting from record <start-index> (0 indexed)
    :query int max-results: Return a maximum of <max-results> records
    :query string query: Search criteria
    :query string order: Sorting criteria
    :query boolean pretty-print: Return formatted JSON response

    :statuscode 200: OK
    :statuscode 204: No content; when no workflow metadata found.
    :statuscode 400: Bad request
    :statuscode 401: Authentication failure
    :statuscode 403: Authorization failure

    :return type: Collection
    :return resource: TaskMeta
    """
    queries = StampedeWorkflowQueries(g.stampede_db_url)

    paged_response = queries.get_task_meta(task_id, **g.query_args)

    if paged_response.total_records == 0:
        log.debug("Total records is 0; returning HTTP 204 No content")
        return make_response("", 204, JSON_HEADER)

    #
    # Generate JSON Response
    #
    response_json = jsonify(paged_response)

    return make_response(response_json, 200, JSON_HEADER)
开发者ID:pegasus-isi,项目名称:pegasus,代码行数:33,代码来源:views.py

示例2: get_job_instance_states

def get_job_instance_states(username, m_wf_id, wf_id, job_id, job_instance_id, recent=False):
    """
    Returns a collection of Job States.

    :query int start-index: Return results starting from record <start-index> (0 indexed)
    :query int max-results: Return a maximum of <max-results> records
    :query string query: Search criteria
    :query string order: Sorting criteria
    :query boolean recent: Get most recent job state
    :query boolean pretty-print: Return formatted JSON response

    :statuscode 200: OK
    :statuscode 204: No content; when no jobstates found.
    :statuscode 400: Bad request
    :statuscode 401: Authentication failure
    :statuscode 403: Authorization failure

    :return type: Collection
    :return resource: JobState
    """
    queries = StampedeWorkflowQueries(g.stampede_db_url)

    paged_response = queries.get_job_instance_states(wf_id, job_id, job_instance_id, recent=recent, **g.query_args)

    if paged_response.total_records == 0:
        log.debug('Total records is 0; returning HTTP 204 No content')
        return make_response('', 204, JSON_HEADER)

    #
    # Generate JSON Response
    #
    response_json = jsonify(paged_response)

    return make_response(response_json, 200, JSON_HEADER)
开发者ID:augre,项目名称:pegasus,代码行数:34,代码来源:views.py

示例3: get_job_instance_invocations

def get_job_instance_invocations(username, m_wf_id, wf_id, job_id, job_instance_id):
    queries = StampedeWorkflowQueries(g.stampede_db_url)

    paged_response = queries.get_job_instance_invocations(wf_id, job_id, job_instance_id,**g.query_args)

    if paged_response.total_records == 0:
        log.debug('Total records is 0; returning HTTP 204 No content')
        return make_response('', 204, JSON_HEADER)

    #
    # Generate JSON Response
    #
    response_json = jsonify(paged_response)

    return make_response(response_json, 200, JSON_HEADER)
开发者ID:augre,项目名称:pegasus,代码行数:15,代码来源:views.py

示例4: get_task

def get_task(username, m_wf_id, wf_id, task_id):
    """
    Returns task identified by m_wf_id, wf_id, task_id.

    :query boolean pretty-print: Return formatted JSON response

    :statuscode 200: OK
    :statuscode 401: Authentication failure
    :statuscode 403: Authorization failure
    :statuscode 404: Not found

    :return type: Record
    :return resource: Task
    """
    queries = StampedeWorkflowQueries(g.stampede_db_url)

    record = queries.get_task(task_id)

    #
    # Generate JSON Response
    #
    response_json = jsonify(record)

    return make_response(response_json, 200, JSON_HEADER)
开发者ID:pegasus-isi,项目名称:pegasus,代码行数:24,代码来源:views.py


注:本文中的Pegasus.service.monitoring.queries.StampedeWorkflowQueries类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。