def __init__(self, listen, snapshot_host, snapshot_req_port, snapshot_sub_port, retry_period, inputs, output): Subscriber.__init__(self, snapshot_host, snapshot_sub_port, inputs) self.inputs = inputs self.output = output self.listen = listen self.error_retry_period = retry_period self.processing_delay = 0.05 # sec self.waiting_to_process = False self.snapshot_requester = Requester(snapshot_host, snapshot_req_port) return
def __init__(self, config): team = config.get("Team", "name") hub_host = config.get("Ratchet Hub", "host") hub_port = int(config.get("Ratchet Hub", "port")) self.ratchet_hub = RatchetHub(hub_host, hub_port) instance_config = self.ratchet_hub.get_qplan_instance_config(team) snapshot_host = instance_config["host"] snapshot_port = instance_config["sub_port"] self.web_host = instance_config["host"] self.web_port = instance_config["web_port"] ratchet_hub_info = self.ratchet_hub.get_ratchet_hub_info() self.name = "%s/%s/UpdaterService" % (ratchet_hub_info["org_name"], team) Subscriber.__init__(self, snapshot_host, snapshot_port, ["=====app qplan", "=====app vacationator"]) return
def __init__(self, config): hub_host = config.get('Ratchet Hub', 'host') hub_port = int(config.get('Ratchet Hub', 'port')) self.ratchet_hub = RatchetHub(hub_host, hub_port) vantage_config = self.ratchet_hub.get_vantage_config() snapshot_host = vantage_config['host'] snapshot_port = int(vantage_config['snapshot_sub_port']) self.web_host = vantage_config['host'] self.web_port = int(vantage_config['web_port']) ratchet_hub_info = self.ratchet_hub.get_ratchet_hub_info() self.name = "%s/VantageUpdaterService" % (ratchet_hub_info['org_name']) Subscriber.__init__(self, snapshot_host, snapshot_port, [ "=====app vantage" ]) return