提交 7c60c0b5 编写于 作者: P peng.xu

Merge branch 'branch-0.4.0' into 'branch-0.4.0'

avoid jenkins break build

See merge request megasearch/milvus!337

Former-commit-id: 8d7d1940c81529ac5eae4efcb034db9f9ff8e9d8
......@@ -16,7 +16,6 @@ aux_source_directory(db/insert db_insert_files)
aux_source_directory(db/meta db_meta_files)
aux_source_directory(metrics metrics_files)
aux_source_directory(wrapper/knowhere knowhere_files)
aux_source_directory(scheduler new_scheduler_files)
aux_source_directory(db/scheduler scheduler_files)
aux_source_directory(db/scheduler/context scheduler_context_files)
......@@ -65,7 +64,6 @@ set(db_files
${db_insert_files}
${db_meta_files}
${db_scheduler_files}
${new_scheduler_files}
${metrics_files}
${knowhere_files}
)
......
......@@ -37,6 +37,14 @@ ResourceMgr::Add(ResourcePtr &&resource) {
finish_task_event_[index] = true;
event_cv_.notify_one();
});
resource->RegisterOnCopyCompleted([&] {
copy_completed_event_[index] = true;
event_cv_.notify_one();
});
resource->RegisterOnTaskTableUpdated([&] {
task_table_updated_event_[index] = true;
event_cv_.notify_one();
});
return ret;
}
......@@ -110,7 +118,7 @@ ResourceMgr::Dump() {
for (uint64_t i = 0; i < resources_.size(); ++i) {
str += "Resource No." + std::to_string(i) + ":\n";
str += resources_[i]->Dump();
//str += resources_[i]->Dump();
}
return str;
......
......@@ -75,25 +75,33 @@ public:
* Register on start up event;
*/
void
RegisterOnStartUp(std::function<void(void)> func);
RegisterOnStartUp(std::function<void(void)> func) {
on_start_up_ = func;
}
/*
* Register on finish one task event;
*/
void
RegisterOnFinishTask(std::function<void(void)> func);
RegisterOnFinishTask(std::function<void(void)> func) {
on_finish_task_ = func;
}
/*
* Register on copy task data completed event;
*/
void
RegisterOnCopyCompleted(std::function<void(void)> func);
RegisterOnCopyCompleted(std::function<void(void)> func) {
on_copy_completed_ = func;
}
/*
* Register on task table updated event;
*/
void
RegisterOnTaskTableUpdated(std::function<void(void)> func);
RegisterOnTaskTableUpdated(std::function<void(void)> func) {
on_task_table_updated_ = func;
}
protected:
Resource(std::string name, ResourceType type)
......
......@@ -42,5 +42,5 @@ add_subdirectory(server)
add_subdirectory(db)
add_subdirectory(knowhere)
add_subdirectory(metrics)
add_subdirectory(scheduler)
#add_subdirectory(scheduler)
#add_subdirectory(storage)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册