本文整理汇总了Python中Pegasus.service.monitoring.queries.StampedeWorkflowQueries.get_workflow_invocations方法的典型用法代码示例。如果您正苦于以下问题:Python StampedeWorkflowQueries.get_workflow_invocations方法的具体用法?Python StampedeWorkflowQueries.get_workflow_invocations怎么用?Python StampedeWorkflowQueries.get_workflow_invocations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pegasus.service.monitoring.queries.StampedeWorkflowQueries
的用法示例。
在下文中一共展示了StampedeWorkflowQueries.get_workflow_invocations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_workflow_invocations
# 需要导入模块: from Pegasus.service.monitoring.queries import StampedeWorkflowQueries [as 别名]
# 或者: from Pegasus.service.monitoring.queries.StampedeWorkflowQueries import get_workflow_invocations [as 别名]
def get_workflow_invocations(username, m_wf_id, wf_id):
"""
Returns a collection of Invocations.
: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 invocations found.
:statuscode 400: Bad request
:statuscode 401: Authentication failure
:statuscode 403: Authorization failure
:return type: Collection
:return resource: Invocation
"""
queries = StampedeWorkflowQueries(g.stampede_db_url)
paged_response = queries.get_workflow_invocations(wf_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)