from PilotManager.PilotManagerComponent import PilotManagerComponent config = loadConfigurationFile(\ '/data/khawar/prototype/PilotManager/DefaultConfig.py') config.section_("General") config.General.workDir = '/data/khawar/prototype/work/PilotManager' config.Agent.componentName='PilotManager' config.section_("CoreDatabase") config.CoreDatabase.dialect = 'mysql' config.CoreDatabase.socket = '/data/khawar/PAProd/0_12_13/prodAgent/mysqldata/mysql.sock' config.CoreDatabase.user = '******' config.CoreDatabase.passwd = '98passwd' config.CoreDatabase.hostname = 'localhost' config.CoreDatabase.name = 'ProdAgentDB' #start the module pilotManager = PilotManagerComponent(config) pilotManager.prepareToStart() #pilotManager.startDaemon() #pilotManager.handleMessage('NewPilotJob','Pilot#45,45,xyzfiles') pilotManager.handleMessage('SubmitPilotJob','Pilot#45,45,xyzfiles')
if ( compCfg.has_key("plugin") ): config.PilotManagerComponent.plugin=compCfg['plugin'] if ( compCfg.has_key("tarPath") ): config.PilotManagerComponent.tarPath=compCfg['tarPath'] else: config.PilotManagerComponent.tarPath=compCfg['ComponentDir'] config.PilotManagerComponent.pilotCode=compCfg['pilotCode'] config.PilotManagerComponent.tqAddress=compCfg['tqAddress'] #settig up the configuration for PilotMonitor config.section_("CoreDatabase") config.CoreDatabase.dialect = dbConfig['dbType'] config.CoreDatabase.socket = dbConfig['socketFileLocation'] config.CoreDatabase.user = dbConfig['user'] config.CoreDatabase.passwd = dbConfig['passwd'] config.CoreDatabase.hostname = dbConfig['host'] #config.CoreDatabase.name = dbConfig['dbName'] config.CoreDatabase.name = 'WMCoreDB' print config # // # // Initialise and start the component #// print "Starting PilotManager Component..." pilotManager = PilotManagerComponent(config) pilotManager.prepareToStart() pilotManager.startDaemon()