def main(): recipe_name, ing_name = parse_arguments() mymon = MASTMon() my_recipe_plan = mymon.set_up_recipe_plan(recipe_name, 1) my_recipe_plan.ingred_to_check = ing_name my_recipe_plan.check_recipe_status() return 0
def main(): recipe_name, ing_name = parse_arguments() mymon = MASTMon() my_recipe_plan = mymon.set_up_recipe_plan(recipe_name, 1) my_recipe_plan.ingred_to_check = ing_name is_complete = my_recipe_plan.complete_ingredient(ing_name) print "COMPLETE: %s" % is_complete if is_complete: my_recipe_plan.check_recipe_status() return 0 return -1
def main(): recipe_name, script_head_dir = parse_arguments() mast_scratch = dirutil.get_mast_scratch_path() mymon = MASTMon() my_recipe_plan = mymon.set_up_recipe_plan(os.path.join(mast_scratch, recipe_name), 1) my_dag_contents=list() for iname in my_recipe_plan.ingredients: #all JOB lines need to be at top my_dag_contents.append("JOB %s submit.sh DIR %s\n" % (iname, iname)) for iname in my_recipe_plan.ingredients: my_dag_contents.append("SCRIPT PRE %s %s/mast_do_setup.sh %s %s\n" % (iname, script_head_dir, recipe_name, iname)) my_dag_contents.append("SCRIPT POST %s %s/mast_check_is_complete.sh %s %s\n" % (iname, script_head_dir, recipe_name, iname)) my_dag_contents.append("RETRY %s 5\n" % iname) ptc = list(my_recipe_plan.parents_to_check[iname]) for pname in ptc: my_dag_contents.append("PARENT %s CHILD %s\n" % (pname, iname)) my_dag_file = MASTFile() my_dag_file.data = my_dag_contents my_dag_file.to_file(os.path.join(mast_scratch, recipe_name, "recipe.dag")) #print_to_file(recipe_name, ing_name, "MAIN: is complete: %s" % is_complete) return 0
def main(): recipe_name, script_head_dir = parse_arguments() mast_scratch = dirutil.get_mast_scratch_path() mymon = MASTMon() my_recipe_plan = mymon.set_up_recipe_plan( os.path.join(mast_scratch, recipe_name), 1) my_dag_contents = list() for iname in my_recipe_plan.ingredients: #all JOB lines need to be at top my_dag_contents.append("JOB %s submit.sh DIR %s\n" % (iname, iname)) for iname in my_recipe_plan.ingredients: my_dag_contents.append("SCRIPT PRE %s %s/mast_do_setup.sh %s %s\n" % (iname, script_head_dir, recipe_name, iname)) my_dag_contents.append( "SCRIPT POST %s %s/mast_check_is_complete.sh %s %s\n" % (iname, script_head_dir, recipe_name, iname)) my_dag_contents.append("RETRY %s 5\n" % iname) ptc = list(my_recipe_plan.parents_to_check[iname]) for pname in ptc: my_dag_contents.append("PARENT %s CHILD %s\n" % (pname, iname)) my_dag_file = MASTFile() my_dag_file.data = my_dag_contents my_dag_file.to_file(os.path.join(mast_scratch, recipe_name, "recipe.dag")) #print_to_file(recipe_name, ing_name, "MAIN: is complete: %s" % is_complete) return 0