import sys sys.path.append('../../src') import weblab import voodoo.gen.loader.Launcher as Launcher def before_shutdown(): print "Stopping servers..." launcher = Launcher.MachineLauncher( '.', 'main_machine', (Launcher.SignalWait(signal.SIGTERM), Launcher.SignalWait(signal.SIGINT), Launcher.RawInputWait( "Press <enter> or send a sigterm or a sigint to finish\n")), { "main_instance1": "logging.configuration.server1.txt", "main_instance2": "logging.configuration.server2.txt", "main_instance3": "logging.configuration.server3.txt", "lab_and_experiment": "logging.configuration.other_server.txt", }, before_shutdown, (Launcher.FileNotifier("_file_notifier", "server started"), ), pid_file='sample_balanced1_machine.pid', debugger_ports={ 'main_instance1': 31337, 'main_instance2': 31338, 'main_instance3': 31339 }) launcher.launch()
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # listed below: # # Author: Pablo Orduña <*****@*****.**> # import sys sys.path.append('../../src') import voodoo.gen.loader.Launcher as Launcher Launcher.kill_launcher('._machine.pid')
import voodoo.gen.loader.Launcher as Launcher def before_shutdown(): print "Stopping servers..." launcher = Launcher.MachineLauncher( '.', 'core_machine', ( Launcher.SignalWait(signal.SIGTERM), Launcher.SignalWait(signal.SIGINT), Launcher.RawInputWait("Press <enter> or send a sigterm or a sigint to finish\n") ), { "core_server1" : "logs/config/logging.configuration.server1.txt", "laboratory1" : "logs/config/logging.configuration.laboratory1.txt", }, before_shutdown, ( Launcher.FileNotifier("_file_notifier", "server started"), ), pid_file = 'weblab.pid', waiting_port = 10012, debugger_ports = { 'core_server1' : 10013, } ) launcher.launch() except: import traceback traceback.print_exc()
# This software consists of contributions made by many individuals, # listed below: # # Author: Pablo Orduña <*****@*****.**> # import signal import sys sys.path.append('../../src') import weblab import voodoo.gen.loader.Launcher as Launcher def before_shutdown(): print "Stopping servers..." import voodoo.rt_debugger as rt_debugger rt_debugger.launch_debugger() launcher = Launcher.Launcher( '.', 'main_machine', 'main_instance', (Launcher.SignalWait(signal.SIGTERM), Launcher.SignalWait(signal.SIGINT), Launcher.RawInputWait( "Press <enter> or send a sigterm or a sigint to finish.\n")), "logging.configuration.no.log.txt", before_shutdown, (Launcher.FileNotifier("_file_notifier", "server started"), )) launcher.launch()
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # listed below: # # Author: Pablo Orduña <*****@*****.**> # import sys sys.path.append('../../src') import voodoo.gen.loader.Launcher as Launcher Launcher.kill_launcher('sample_balanced1_machine.pid')