提交 d0e7744a 编写于 作者: W wxyu

MS-611 Add resources validity check in ResourceMgr


Former-commit-id: cc00283529c2e56ee9829c2f42d7c217d1ba3f42
上级 0d3da0b8
......@@ -66,12 +66,10 @@ JobMgr::worker_function() {
}
auto tasks = build_task(job);
auto disk_list = res_mgr_->GetDiskResources();
if (!disk_list.empty()) {
if (auto disk = disk_list[0].lock()) {
for (auto& task : tasks) {
disk->task_table().Put(task);
}
// disk resources NEVER be empty.
if (auto disk = res_mgr_->GetDiskResources()[0].lock()) {
for (auto& task : tasks) {
disk->task_table().Put(task);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册