When graph_schema is not specified, codegen proxy will use the running graph schema in graph_db_service
| 66 | // When graph_schema is not specified, codegen proxy will use the running graph |
| 67 | // schema in graph_db_service |
| 68 | void init_codegen_proxy(const bpo::variables_map& vm, |
| 69 | const std::string& engine_config_file, |
| 70 | const std::string& graph_schema_file = "") { |
| 71 | std::string codegen_dir = parse_codegen_dir(vm); |
| 72 | std::string codegen_bin; |
| 73 | if (vm.count("codegen-bin") == 0) { |
| 74 | LOG(INFO) << "codegen-bin is not specified"; |
| 75 | codegen_bin = find_codegen_bin(); |
| 76 | } else { |
| 77 | LOG(INFO) << "codegen-bin is specified"; |
| 78 | codegen_bin = vm["codegen-bin"].as<std::string>(); |
| 79 | if (!std::filesystem::exists(codegen_bin)) { |
| 80 | LOG(FATAL) << "codegen bin not exists: " << codegen_bin; |
| 81 | } |
| 82 | } |
| 83 | server::CodegenProxy::get().Init(codegen_dir, codegen_bin, engine_config_file, |
| 84 | graph_schema_file); |
| 85 | } |
| 86 | |
| 87 | void config_log_level(int log_level, int verbose_level) { |
| 88 | if (getenv("GLOG_minloglevel") != nullptr) { |
no test coverage detected