def __init__(self, options=None, args=None): self.event_manager = EventManager() self.plugin_manager = PluginManager("plugin.ini", "mirror.plugin.mirrorplugin") component.start() self.scheduler = Scheduler(options, args)
class MirrorDaemon(object): def __init__(self, options = None, args = None): self.event_manager = EventManager() self.plugin_manager = PluginManager("plugin.ini", "mirror.plugin.mirrorplugin") component.start() self.scheduler = Scheduler(options, args) log.info("Starting mirror scheduler...") self.scheduler.start()
class MirrorDaemon(object): def __init__(self, options=None, args=None): self.event_manager = EventManager() self.plugin_manager = PluginManager("plugin.ini", "mirror.plugin.mirrorplugin") component.start() self.scheduler = Scheduler(options, args) def start(self): log.info("Starting mirror scheduler...") self.scheduler.start()
sys.exit(1) except Exception, e: log.exception(e) sys.exit(1) import mirror.handler signal.signal(signal.SIGTERM, mirror.handler.shutdown_handler) signal.signal(signal.SIGINT, mirror.handler.shutdown_handler) signal.signal(signal.SIGCHLD, mirror.handler.sigchld_handler) if options.profile: import hotshot hsp = hotshot.Profile(mirror.configmanager.get_config_dir("mirrord.profile")) hsp.start() try: from mirror.scheduler import Scheduler scheduler = Scheduler(options, args) scheduler.start() except Exception, e: log.exception(e) sys.exit(1) finally: if options.profile: hsp.stop() hsp.close() import hotshot.stats stats = hotshot.stats.load(mirror.configmanager.get_config_dir("mirrord.profile")) stats.strip_dirs() stats.sort_stats("time", "calls") stats.print_stats(400)
def __init__(self, options = None, args = None): self.event_manager = EventManager() self.plugin_manager = PluginManager("plugin.ini", "mirror.plugin.mirrorplugin") component.start() self.scheduler = Scheduler(options, args)