def runplugins(plugins, env, basefolder, url_root, level = 'default'): printtime("Starting plugins runlevel=%s in basefolder= %s" % (level,basefolder) ) try: pluginserver = xmlrpclib.ServerProxy("http://%s:%d" % (PLUGINSERVER_HOST, PLUGINSERVER_PORT), allow_none=True) env['runlevel'] = level # 'last' plugin level waits for ALL previously launched plugins hold_last = [] if level == 'last': hold_last = [p.get('jid','') for p in plugins.values() if p.get('jid','')] # gather plugins to run for this level run_plugins = {} for name in plugins.keys(): if level in plugins[name]['runlevel'] and name != '': if level == 'last': plugins[name]['hold_jid'] = hold_last run_plugins[name] = plugins[name] if len(run_plugins) > 0: run_plugins, msg = call_launchPluginsXMLRPC(env, run_plugins, basefolder, url_root, pluginserver) print msg # save needed info for multilevel plugins for name in run_plugins.keys(): plugins[name] = run_plugins[name] except: traceback.print_exc() return plugins
def runplugins(plugins, env, level=RunLevel.DEFAULT, params={}): printtime("Starting plugins runlevel=%s" % level) params.setdefault('run_mode', 'pipeline') # Plugins launched here come from pipeline try: pluginserver = xmlrpclib.ServerProxy("http://%s:%d" % (PLUGINSERVER_HOST, PLUGINSERVER_PORT), allow_none=True) # call ionPlugin xmlrpc function to launch selected plugins # note that dependency plugins may be added to the plugins dict plugins, msg = call_launchPluginsXMLRPC(env['primary_key'], plugins, env['net_location'], env['username'], level, params, pluginserver) print msg except: traceback.print_exc() return plugins
def runplugins(plugins, env, level = RunLevel.DEFAULT, params={}): printtime("Starting plugins runlevel=%s" % level ) params.setdefault('run_mode', 'pipeline') ## Plugins launched here come from pipeline try: pluginserver = xmlrpclib.ServerProxy("http://%s:%d" % (PLUGINSERVER_HOST, PLUGINSERVER_PORT), allow_none=True) # call ionPlugin xmlrpc function to launch selected plugins # note that dependency plugins may be added to the plugins dict plugins, msg = call_launchPluginsXMLRPC(env['primary_key'], plugins, env['net_location'], env['username'], level, params, pluginserver) print msg except: traceback.print_exc() return plugins