本文整理汇总了Python中oozie.conf.SHARE_JOBS.get方法的典型用法代码示例。如果您正苦于以下问题:Python SHARE_JOBS.get方法的具体用法?Python SHARE_JOBS.get怎么用?Python SHARE_JOBS.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oozie.conf.SHARE_JOBS
的用法示例。
在下文中一共展示了SHARE_JOBS.get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: list_trashed_workflows
# 需要导入模块: from oozie.conf import SHARE_JOBS [as 别名]
# 或者: from oozie.conf.SHARE_JOBS import get [as 别名]
def list_trashed_workflows(request):
data = Workflow.objects.trashed().filter(managed=True)
if not SHARE_JOBS.get() and not request.user.is_superuser:
data = data.filter(owner=request.user)
else:
data = data.filter(Q(is_shared=True) | Q(owner=request.user))
data = data.order_by('-last_modified')
return render('editor/list_trashed_workflows.mako', request, {
'jobs': list(data),
'json_jobs': json.dumps(list(data.values_list('id', flat=True))),
})
示例2: list_bundles
# 需要导入模块: from oozie.conf import SHARE_JOBS [as 别名]
# 或者: from oozie.conf.SHARE_JOBS import get [as 别名]
def list_bundles(request):
data = Bundle.objects.available()
if not SHARE_JOBS.get() and not request.user.is_superuser:
data = data.filter(owner=request.user)
else:
data = data.filter(Q(is_shared=True) | Q(owner=request.user))
data = data.order_by('-last_modified')
return render('editor/list_bundles.mako', request, {
'jobs': list(data),
'json_jobs': json.dumps(list(data.values_list('id', flat=True))),
})
示例3: list_coordinators
# 需要导入模块: from oozie.conf import SHARE_JOBS [as 别名]
# 或者: from oozie.conf.SHARE_JOBS import get [as 别名]
def list_coordinators(request, workflow_id=None):
data = Coordinator.objects
if workflow_id is not None:
data = data.filter(workflow__id=workflow_id)
if not SHARE_JOBS.get() and not request.user.is_superuser:
data = data.filter(owner=request.user)
else:
data = data.filter(Q(is_shared=True) | Q(owner=request.user))
data = data.order_by('-last_modified')
return render('editor/list_coordinators.mako', request, {
'jobs': list(data),
'json_jobs': json.dumps(list(data.values_list('id', flat=True))),
})
示例4: list_workflows
# 需要导入模块: from oozie.conf import SHARE_JOBS [as 别名]
# 或者: from oozie.conf.SHARE_JOBS import get [as 别名]
def list_workflows(request):
show_setup_app = True
data = Workflow.objects
if not SHARE_JOBS.get() and not request.user.is_superuser:
data = data.filter(owner=request.user)
else:
data = data.filter(Q(is_shared=True) | Q(owner=request.user))
data = data.order_by('-last_modified')
return render('editor/list_workflows.mako', request, {
'jobs': list(data),
'currentuser': request.user,
'show_setup_app': show_setup_app,
})
示例5: list_workflows
# 需要导入模块: from oozie.conf import SHARE_JOBS [as 别名]
# 或者: from oozie.conf.SHARE_JOBS import get [as 别名]
def list_workflows(request):
show_setup_app = True
data = Workflow.objects
if not SHARE_JOBS.get() and not request.user.is_superuser:
data = data.filter(owner=request.user)
else:
data = data.filter(Q(is_shared=True) | Q(owner=request.user))
data = data.order_by("-last_modified")
return render(
"editor/list_workflows.mako",
request,
{"jobs": list(data), "currentuser": request.user, "show_setup_app": show_setup_app},
)