def __init__(self): self.monitorConfig = ServicePerfListMonitorConfig() self.perfListMonitor = PerfListMonitor(config=self.monitorConfig) self.processorConfig = ServicePerfListProcessorConfig() self.perfListProcessor = PerfListProcessor(self.processorConfig) self.pMUMonitorConfig = ServicePMUMonitorConfig() self.pMUMonitor = PMUMonitor(config=self.pMUMonitorConfig) self.pMUProcessorConfig = ServicePMUProcessorConfig() self.pMUProcessor = PMUProcessor(config=self.pMUProcessorConfig) #self.sARMonitorConfig = ServiceSARMonitorConfig() #self.sARMonitor = SARMonitor(self.sARMonitorConfig) #self.sARProcessorConfig = ServiceSARProcessorConfig() #self.sARProcessor = SARProcessor(self.sARProcessorConfig) self.backgroundServiceProcessorConfig = BackgroundServiceProcessorConfig( ) self.backgroundServiceProcessor = BackgroundServiceProcessor( self.backgroundServiceProcessorConfig)
class BackgroundServiceMonitorAdapter(MonitorAdapter): def __init__(self): self.monitorConfig = ServicePerfListMonitorConfig() self.perfListMonitor = PerfListMonitor(config=self.monitorConfig) self.processorConfig = ServicePerfListProcessorConfig() self.perfListProcessor = PerfListProcessor(self.processorConfig) self.pMUMonitorConfig = ServicePMUMonitorConfig() self.pMUMonitor = PMUMonitor(config=self.pMUMonitorConfig) self.pMUProcessorConfig = ServicePMUProcessorConfig() self.pMUProcessor = PMUProcessor(config=self.pMUProcessorConfig) #self.sARMonitorConfig = ServiceSARMonitorConfig() #self.sARMonitor = SARMonitor(self.sARMonitorConfig) #self.sARProcessorConfig = ServiceSARProcessorConfig() #self.sARProcessor = SARProcessor(self.sARProcessorConfig) self.backgroundServiceProcessorConfig = BackgroundServiceProcessorConfig( ) self.backgroundServiceProcessor = BackgroundServiceProcessor( self.backgroundServiceProcessorConfig) def clearOutputPath(self, job): self.monitorConfig.clearOutputPath(job.path) def startMonitor(self, job): self.timestampStr = time.strftime('%Y%m%d%H%M%S', time.localtime()) self.perfListMonitor.run(job) self.pMUMonitor.run(job) def startProcessor(self, job): self.perfListProcessor.run(job) self.pMUProcessor.run(job) self.processorConfig.removeInputFile() self.pMUProcessorConfig.removeInputFile() self.backgroundServiceProcessorConfig.outputFileName = self.timestampStr self.backgroundServiceProcessor.run(job) self.backgroundServiceProcessorConfig.removeInputFile()
class BackgroundServiceMonitorAdapter(MonitorAdapter): def __init__(self): self.monitorConfig = ServicePerfListMonitorConfig() self.perfListMonitor = PerfListMonitor(config=self.monitorConfig) self.processorConfig = ServicePerfListProcessorConfig() self.perfListProcessor = PerfListProcessor(self.processorConfig) self.pMUMonitorConfig = ServicePMUMonitorConfig() self.pMUMonitor = PMUMonitor(config=self.pMUMonitorConfig) self.pMUProcessorConfig = ServicePMUProcessorConfig() self.pMUProcessor = PMUProcessor(config=self.pMUProcessorConfig) #self.sARMonitorConfig = ServiceSARMonitorConfig() #self.sARMonitor = SARMonitor(self.sARMonitorConfig) #self.sARProcessorConfig = ServiceSARProcessorConfig() #self.sARProcessor = SARProcessor(self.sARProcessorConfig) self.backgroundServiceProcessorConfig = BackgroundServiceProcessorConfig() self.backgroundServiceProcessor = BackgroundServiceProcessor(self.backgroundServiceProcessorConfig) def clearOutputPath(self, job): self.monitorConfig.clearOutputPath(job.path) def startMonitor(self, job): self.timestampStr = time.strftime('%Y%m%d%H%M%S', time.localtime()) self.perfListMonitor.run(job) self.pMUMonitor.run(job) def startProcessor(self, job): self.perfListProcessor.run(job) self.pMUProcessor.run(job) self.processorConfig.removeInputFile() self.pMUProcessorConfig.removeInputFile() self.backgroundServiceProcessorConfig.outputFileName = self.timestampStr self.backgroundServiceProcessor.run(job) self.backgroundServiceProcessorConfig.removeInputFile()
def __init__(self): self.monitorConfig = ServicePerfListMonitorConfig() self.perfListMonitor = PerfListMonitor(config=self.monitorConfig) self.processorConfig = ServicePerfListProcessorConfig() self.perfListProcessor = PerfListProcessor(self.processorConfig) self.pMUMonitorConfig = ServicePMUMonitorConfig() self.pMUMonitor = PMUMonitor(config=self.pMUMonitorConfig) self.pMUProcessorConfig = ServicePMUProcessorConfig() self.pMUProcessor = PMUProcessor(config=self.pMUProcessorConfig) #self.sARMonitorConfig = ServiceSARMonitorConfig() #self.sARMonitor = SARMonitor(self.sARMonitorConfig) #self.sARProcessorConfig = ServiceSARProcessorConfig() #self.sARProcessor = SARProcessor(self.sARProcessorConfig) self.backgroundServiceProcessorConfig = BackgroundServiceProcessorConfig() self.backgroundServiceProcessor = BackgroundServiceProcessor(self.backgroundServiceProcessorConfig)