def processUbertoolBatchRunsIntoBatchModelRuns(ubertools): logger.info("Start Ubertool Batching") batch_id = ubertools['id'] user = users.get_current_user() batchs = Batch.all() batch = None for poss_batch in batchs: logger.info(batch_id) logger.info(str(poss_batch.key())) if str(poss_batch.key()) == batch_id: batch = poss_batch logger.info(batch.to_xml()) ubertools_results = {} ubertools_data = ubertools['ubertools'] for ubertool in ubertools_data: combined_ubertool_props = combineUbertoolProperties(ubertool) ubertool_id = combined_ubertool_props["ubertool-config-name"] ubertool_result = {} #logger.info(combined_ubertool_props) ubertool_result = terrPlantRunner.runTerrPlantModel(combined_ubertool_props,ubertool_result) ubertool_result = sipRunner.runSIPModel(combined_ubertool_props,ubertool_result) #perform on all other eco models ubertools_results[ubertool_id]=ubertool_result batch.completed = db.DateTimeProperty.now() results_pickle = pickle.dumps(ubertools_results) batch.ubertool_results = results_pickle batch.put() logger.info(batch.to_xml())