Remove ImportManager::HasActiveQuerydbImports.

ImportPipelineStatus::num_active_threads can be used instead.
This commit is contained in:
Jacob Dufault 2018-01-17 21:34:47 -08:00
parent 0fd3d69600
commit 8fef86c0f8
3 changed files with 0 additions and 8 deletions

View File

@ -12,7 +12,3 @@ bool ImportManager::StartQueryDbImport(const std::string& path) {
void ImportManager::DoneQueryDbImport(const std::string& path) { void ImportManager::DoneQueryDbImport(const std::string& path) {
querydb_processing_.erase(path); querydb_processing_.erase(path);
} }
bool ImportManager::HasActiveQuerydbImports() {
return !querydb_processing_.empty();
}

View File

@ -21,9 +21,6 @@ struct ImportManager {
// The file has been fully imported and can be imported again later on. // The file has been fully imported and can be imported again later on.
void DoneQueryDbImport(const std::string& path); void DoneQueryDbImport(const std::string& path);
// Returns true if there any any files currently being imported.
bool HasActiveQuerydbImports();
std::unordered_set<std::string> querydb_processing_; std::unordered_set<std::string> querydb_processing_;
// TODO: use std::shared_mutex so we can have multiple readers. // TODO: use std::shared_mutex so we can have multiple readers.

View File

@ -23,7 +23,6 @@ struct CqueryWaitHandler : MessageHandler {
while (true) { while (true) {
bool has_work = false; bool has_work = false;
has_work |= import_pipeline_status->num_active_threads != 0; has_work |= import_pipeline_status->num_active_threads != 0;
has_work |= import_manager->HasActiveQuerydbImports();
has_work |= QueueManager::instance()->HasWork(); has_work |= QueueManager::instance()->HasWork();
has_work |= has_work |=
QueryDb_ImportMain(config, db, import_manager, import_pipeline_status, QueryDb_ImportMain(config, db, import_manager, import_pipeline_status,