コード例 #1
0
ファイル: DashboardMS.py プロジェクト: kreczko/ganga
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
コード例 #2
0
ファイル: MSGMS.py プロジェクト: chrisburr/ganga
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
コード例 #3
0
ファイル: feedback_report.py プロジェクト: chrisburr/ganga
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
コード例 #4
0
ファイル: PilotThread.py プロジェクト: wvengen/lgipilot
#
# 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')