| 179 | } |
| 180 | |
| 181 | int Framework::reload(const std::string& v_path) { |
| 182 | int ret = bg_load_base(v_path); |
| 183 | if (ret != 0) { |
| 184 | LOG(WARNING) << "background load dict base failed"; |
| 185 | } else { |
| 186 | LOG(INFO) << "background load dict base succ"; |
| 187 | } |
| 188 | |
| 189 | ret = bg_switch(); |
| 190 | if (ret != 0) { |
| 191 | LOG(WARNING) << "switch background dict failed"; |
| 192 | } else { |
| 193 | LOG(INFO) << "switch background dict succ"; |
| 194 | } |
| 195 | |
| 196 | ret = bg_unload(); |
| 197 | if (ret != 0) { |
| 198 | LOG(WARNING) << "unload background dict failed"; |
| 199 | } else { |
| 200 | LOG(INFO) << "unload background dict succ"; |
| 201 | } |
| 202 | |
| 203 | return ret; |
| 204 | } |
| 205 | |
| 206 | int Framework::patch(const std::string& v_path) { |
| 207 | int ret = bg_load_patch(v_path); |