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


Python Config.makeConfig方法代码示例

本文整理汇总了Python中Ganga.Utility.Config.makeConfig方法的典型用法代码示例。如果您正苦于以下问题:Python Config.makeConfig方法的具体用法?Python Config.makeConfig怎么用?Python Config.makeConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ganga.Utility.Config的用法示例。


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

示例1: _initconfig

# 需要导入模块: from Ganga.Utility import Config [as 别名]
# 或者: from Ganga.Utility.Config import makeConfig [as 别名]
def _initconfig():
    """Initialize DashboardMS configuration."""
    try:
        from Ganga.Utility import Config
        # create configuration
        config = Config.makeConfig(
            'DashboardMS', 'Settings for Dashboard Messaging Service.')
        config.addOption('server', 'dashb-mb.cern.ch', 'The MSG server name.')
        config.addOption('port', 61113, 'The MSG server port.')
        config.addOption('user', 'ganga-atlas', '')
        config.addOption('password', 'analysis', '')
        config.addOption('destination_job_status', '/topic/dashboard.atlas.jobStatus',
                         'The MSG destination (topic or queue) for job status messages.')
        config.addOption('destination_job_processing_attributes', '/topic/dashboard.atlas.jobProcessingAttributes',
                         'The MSG destination (topic or queue) for job processing attributes messages.')
        config.addOption('destination_job_meta', '/topic/dashboard.atlas.jobMeta',
                         'The MSG destination (topic or queue) for job meta messages.')
        config.addOption('destination_task_meta', '/topic/dashboard.atlas.taskMeta',
                         'The MSG destination (topic or queue) for task meta messages.')
        config.addOption(
            'task_type', 'analysis', 'The type of task. e.g. analysis, production, hammercloud,...')
        # prevent modification during the interactive ganga session

        def deny_modification(name, value):
            raise Config.ConfigError(
                'Cannot modify [DashboardMS] settings (attempted %s=%s)' % (name, value))
        config.attachUserHandler(deny_modification, None)
    except ImportError:
        # on worker node so Config is not needed since it is copied to
        # DashboardMS constructor
        pass
开发者ID:kreczko,项目名称:ganga,代码行数:33,代码来源:DashboardMS.py

示例2: _initconfig

# 需要导入模块: from Ganga.Utility import Config [as 别名]
# 或者: from Ganga.Utility.Config import makeConfig [as 别名]
def _initconfig():
    """Initialize MSGMS configuration."""
    try:
        from Ganga.Utility import Config
        # create configuration
        config = Config.makeConfig(
            'MSGMS', 'Settings for the MSGMS monitoring plugin. Cannot be changed ruding the interactive Ganga session.')
        config.addOption(
            'server', 'dashb-mb.cern.ch', 'The server to connect to')
        config.addOption('port', 61113, 'The port to connect to')
        config.addOption('username', 'ganga', '')
        config.addOption('password', 'analysis', '')
        config.addOption('message_destination', '/queue/ganga.status', '')
        config.addOption('usage_message_destination', "/queue/ganga.usage", '')
        config.addOption(
            'job_submission_message_destination', "/queue/ganga.jobsubmission", '')

        # prevent modification during the interactive ganga session
        def deny_modification(name, x):
            raise Config.ConfigError(
                'Cannot modify [MSGMS] settings (attempted %s=%s)' % (name, x))
        config.attachUserHandler(deny_modification, None)
    except ImportError:
        # on worker node so Config is not needed since it is copied to MSGMS
        # constructor
        pass
开发者ID:chrisburr,项目名称:ganga,代码行数:28,代码来源:MSGMS.py

示例3: _initconfigFeed

# 需要导入模块: from Ganga.Utility import Config [as 别名]
# 或者: from Ganga.Utility.Config import makeConfig [as 别名]
def _initconfigFeed():
    """Initialize Feedback configuration."""
    try:
        from Ganga.Utility import Config
        # create configuration
        config = Config.makeConfig(
            'Feedback', 'Settings for the Feedback plugin. Cannot be changed ruding the interactive Ganga session.')
        config.addOption(
            'uploadServer', 'http://gangamon.cern.ch/django/errorreports', 'The server to connect to')

        def deny_modification(name, x):
            raise Config.ConfigError(
                'Cannot modify [Feedback] settings (attempted %s=%s)' % (name, x))
        config.attachUserHandler(deny_modification, None)
    except ImportError:
        # on worker node so Config is not needed since it is copied to Feedback
        # constructor
        pass
开发者ID:chrisburr,项目名称:ganga,代码行数:20,代码来源:feedback_report.py

示例4: are

# 需要导入模块: from Ganga.Utility import Config [as 别名]
# 或者: from Ganga.Utility.Config import makeConfig [as 别名]
#
# This is free software; you can redistribute it and/or modify it under the terms of
# the GNU General Public License as published by the Free Software Foundation.
#
# http://www.gnu.org/licenses/gpl.txt

import os
import time
import datetime
from InterpoList import InterpoList
from Ganga.Utility import Config
from Ganga.Utility.logging import getLogger
from Ganga.Core.GangaThread import GangaThread

# Module configuration
config = Config.makeConfig('LGI', 'Leiden Grid Initiative Pilot job framework settings')
config.addOption('PilotDist', 'pilotdist/pilotjob.tar.gz',
	'Pilot job resource daemon tarball, fully configured for your applications and project server')
config.addOption('PilotScript', 'pilotdist/pilotrun.sh',
	'Script to run inside pilotjob, which unpacks the tarball and executes the resource daemon')

config.addOption('SchedMin',  1, 'Minimum number of pilotjobs at all times')
config.addOption('SchedMax', 10, 'Maximum number of pilotjobs')

config.addOption('Poll', 30, 'LGI thread polling time')
config.addOption('Update', 10, 'Pilot thread update time')
config.addOption('WaitNew', 60, 'If after this many seconds there are (still) more LGI jobs than pilotjobs, spawn new pilotjobs.')
config.addOption('WaitTerm', 300, 'Terminate pilotjob after seconds of idle time')
config.addOption('MaxRuntime', None, 'Maximum run-time of pilotjobs in seconds. Leave empty to run indefinitely until batch system terminates it.')

config.addOption('StatsInterval', 0, 'Statistics logging interval, or 0 for no statistics')
开发者ID:wvengen,项目名称:lgipilot,代码行数:33,代码来源:PilotThread.py


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