def enableMonitoringService(): from Ganga.Core import monitoring_component monitoring_component.alive = True monitoring_component.enableMonitoring() from Ganga.Core.MonitoringComponent.Local_GangaMC_Service import _makeThreadPool, ThreadPool if not ThreadPool or len(ThreadPool) == 0: _makeThreadPool() global servicesEnabled servicesEnabled = True
def enableMonitoringService(): from Ganga.Core import monitoring_component monitoring_component.alive = True monitoring_component.enableMonitoring() from Ganga.Core.MonitoringComponent.Local_GangaMC_Service import _makeThreadPool _makeThreadPool() from Ganga.GPI import queues queues._start_all_threads() global servicesEnabled servicesEnabled = True
def enableInternalServices(): """ activates the internal services previously disabled due to expired credentials """ global servicesEnabled #make sure all required credentials are valid missing_cred = getMissingCredentials() if missing_cred: log.error("The following credentials are still required: %s." "Make sure you renew them before reactivating this session" % ','.join(missing_cred)) return #startup the registries from Ganga.Runtime import Repository_runtime Repository_runtime.bootstrap() log.debug("Enabling the internal services") # reenable the monitoring loop if *autostart* is set from Ganga.Core import monitoring_component from Ganga.Core.MonitoringComponent.Local_GangaMC_Service import config if config['autostart']: monitoring_component.enableMonitoring() servicesEnabled = True log.info('Internal services reactivated successfuly')
sock.listen(5) # create the watchdog settings wdog = WatchdogThread() wdog.start() timeout = config['Configuration']['ServerTimeout'] * 60 running = True reset_time = time.time() # get the logger logger = getLogger() # start the monitoring from Ganga.Core import monitoring_component monitoring_component.enableMonitoring() # start the user script execution usr_thd = UserScriptThread() usr_thd.start() # main loop while True: # accept connections while running: conn_failed = False try: conn, addr = sock.accept()