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


Python SHARE_JOBS.get方法代码示例

本文整理汇总了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))),
  })
开发者ID:yjkim,项目名称:hue,代码行数:16,代码来源:editor.py

示例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))),
  })
开发者ID:2013Commons,项目名称:HUE-SHARK,代码行数:16,代码来源:editor.py

示例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))),
  })
开发者ID:yjkim,项目名称:hue,代码行数:18,代码来源:editor.py

示例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,
  })
开发者ID:zwqjsj0404,项目名称:hue,代码行数:18,代码来源:editor.py

示例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},
    )
开发者ID:romainr,项目名称:hue,代码行数:18,代码来源:editor.py


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