| 423 | } |
| 424 | |
| 425 | void ModelReusableAgent::threadModelStorage(const std::weak_ptr<ModelReusableAgent> &agent) { |
| 426 | int saveInterval = 1000 * 60 * 10; // save model per 10 min |
| 427 | while (!agent.expired()) { |
| 428 | agent.lock()->saveReuseModel(agent.lock()->_modelSavePath); |
| 429 | std::this_thread::sleep_for(std::chrono::milliseconds(saveInterval)); |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | #ifdef __ANDROID__ |
| 434 | #define STORAGE_PREFIX "/sdcard/fastbot_" |
nothing calls this directly
no test coverage detected