#log entries were made logger.info("Timezone: %s" % str(time.tzname)) logger.info("UTC time: %s" % str(datetime.utcnow())) signal.signal(signal.SIGINT, keyboardInterruptHandler) api_client = api_client.AirtimeApiClient() g = Global(api_client) while not g.selfcheck(): time.sleep(5) success = False while not success: try: api_client.register_component('pypo') success = True except Exception, e: logger.error(str(e)) time.sleep(10) telnet_lock = Lock() ls_host = config['ls_host'] ls_port = config['ls_port'] liquidsoap_startup_test() if options.test: g.test_api() sys.exit(0)
signal.signal(signal.SIGINT, keyboardInterruptHandler) # initialize g = Global() while not g.selfcheck(): time.sleep(5) logger = logging.getLogger() if options.test: g.test_api() sys.exit() api_client = api_client.api_client_factory(config) api_client.register_component("pypo") pypoFetch_q = Queue() recorder_q = Queue() pypoPush_q = Queue() telnet_lock = Lock() """ This queue is shared between pypo-fetch and pypo-file, where pypo-file is the receiver. Pypo-fetch will send every schedule it gets to pypo-file and pypo will parse this schedule to determine which file has the highest priority, and will retrieve it. """ media_q = Queue() pmh = PypoMessageHandler(pypoFetch_q, recorder_q)
logger.warning("Liquidsoap not started yet. Sleeping one second and trying again") time.sleep(1) if options.test: g.test_api() sys.exit() api_client = api_client.AirtimeApiClient() ReplayGainUpdater.start_reply_gain(api_client) SilanAnalyzer.start_silan(api_client, logger) success = False while not success: try: api_client.register_component("pypo") success = True except Exception, e: logger.error(str(e)) time.sleep(10) pypoFetch_q = Queue() recorder_q = Queue() pypoPush_q = Queue() """ This queue is shared between pypo-fetch and pypo-file, where pypo-file is the receiver. Pypo-fetch will send every schedule it gets to pypo-file and pypo will parse this schedule to determine which file has the highest priority, and will retrieve it. """
#Although all of our calculations are in UTC, it is useful to know what #timezone the local machine is, so that we have a reference for what time #the actual log entries were made logger.info("Timezone: %s" % str(time.tzname)) logger.info("UTC time: %s" % str(datetime.now())) api_client = api_client.AirtimeApiClient() while not api_client.is_server_compatible(): time.sleep(5) success = False while not success: try: api_client.register_component('pypo') success = True except Exception, e: logger.error(str(e)) time.sleep(10) ls_host = config['ls_host'] ls_port = config['ls_port'] pypo_liquidsoap = PypoLiquidsoap(logger, ls_host, ls_port) pypo_liquidsoap.liquidsoap_startup_test() if ANALYSE_REPLAYGAIN: ReplayGainUpdater.start_reply_gain(api_client) if ANALYSE_SILENCE: SilanAnalyzer.start_silan(api_client, logger)