mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
avoid jenkins break build
Former-commit-id: b326a6ae14befd2f5dad11076cc4299edc55d341
This commit is contained in:
parent
251d03ee7f
commit
039b38bc71
@ -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)
|
Loading…
Reference in New Issue
Block a user