def visualize_build_request(build_root, goals, subjects): scheduler, storage = setup_json_scheduler(build_root) execution_request = scheduler.build_request(goals, subjects) # NB: Calls `reduce` independently of `execute`, in order to render a graph before validating it. engine = LocalSerialEngine(scheduler, storage) engine.start() try: engine.reduce(execution_request) visualize_execution_graph(scheduler, storage, execution_request) finally: engine.close()
def visualize_build_request(build_root, goals, subjects): with subsystem_instance(Native.Factory) as native_factory: scheduler = setup_json_scheduler(build_root, native_factory.create()) execution_request = scheduler.build_request(goals, subjects) # NB: Calls `reduce` independently of `execute`, in order to render a graph before validating it. engine = LocalSerialEngine(scheduler, Storage.create()) try: engine.reduce(execution_request) visualize_execution_graph(scheduler, execution_request) finally: engine.close()