# # # Read Boot File # expand json file # file_handle = open("/data/redis_server.json", 'r') data = file_handle.read() file_handle.close() redis_site = json.loads(data) # # Setup handle # open data stores instance qs = Query_Support(redis_site) redis_handle = qs.get_redis_data_handle() query_list = [] query_list = qs.add_match_relationship(query_list, relationship="SITE", label=redis_site["site"]) query_list = qs.add_match_terminal( query_list, relationship="PACKAGE", property_mask={"name": "CLOUD_SERVICE_QUEUE_DATA"}) package_sets, package_sources = qs.match_list(query_list) package = package_sources[0] data_structures = package["data_structures"] data = data_structures["CLOUD_JOB_SERVER"]
query_list = qs.add_match_relationship(query_list, relationship="SITE", label=redis_site["site"]) query_list = qs.add_match_terminal( query_list, relationship="PACKAGE", property_mask={"name": "IRRIGIGATION_SCHEDULING_CONTROL_DATA"}) package_sets, package_sources = qs.match_list(query_list) package = package_sources[0] data_structures = package["data_structures"] generate_handlers = Generate_Handlers(package, qs) app_files = APP_FILES(qs.get_redis_data_handle(), redis_site) sys_files = SYS_FILES(qs.get_redis_data_handle(), redis_site) ds_handlers = {} ds_handlers[ "IRRIGATION_PAST_ACTIONS"] = generate_handlers.construct_redis_stream_writer( data_structures["IRRIGATION_PAST_ACTIONS"]) ds_handlers[ "IRRIGATION_CURRENT_CLIENT"] = generate_handlers.construct_job_queue_client( data_structures["IRRIGATION_CURRENT"]) ds_handlers[ "IRRIGATION_CURRENT_SERVER"] = generate_handlers.construct_job_queue_server( data_structures["IRRIGATION_CURRENT"]) ds_handlers[ "IRRIGATION_JOB_SCHEDULING"] = generate_handlers.construct_job_queue_server( data_structures["IRRIGATION_JOB_SCHEDULING"])