fix events
This commit is contained in:
parent
72314606f3
commit
560ffbbb6a
@ -480,7 +480,6 @@ auto base_provider::set_item_meta(const std::string &api_path,
|
|||||||
|
|
||||||
auto base_provider::start(api_item_added_callback api_item_added,
|
auto base_provider::start(api_item_added_callback api_item_added,
|
||||||
i_file_manager *mgr) -> bool {
|
i_file_manager *mgr) -> bool {
|
||||||
event_system::instance().raise<service_started>("sia_provider");
|
|
||||||
utils::db::create_rocksdb(config_, DB_NAME, db_);
|
utils::db::create_rocksdb(config_, DB_NAME, db_);
|
||||||
|
|
||||||
api_item_added_ = api_item_added;
|
api_item_added_ = api_item_added;
|
||||||
@ -521,9 +520,7 @@ auto base_provider::start(api_item_added_callback api_item_added,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void base_provider::stop() {
|
void base_provider::stop() {
|
||||||
event_system::instance().raise<service_shutdown_begin>("sia_provider");
|
|
||||||
polling::instance().remove_callback("check_deleted");
|
polling::instance().remove_callback("check_deleted");
|
||||||
db_.reset();
|
db_.reset();
|
||||||
event_system::instance().raise<service_shutdown_end>("sia_provider");
|
|
||||||
}
|
}
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
@ -802,7 +802,11 @@ auto sia_provider::start(api_item_added_callback api_item_added,
|
|||||||
return base_provider::start(api_item_added, mgr);
|
return base_provider::start(api_item_added, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sia_provider::stop() { return base_provider::stop(); }
|
void sia_provider::stop() {
|
||||||
|
event_system::instance().raise<service_shutdown_begin>("sia_provider");
|
||||||
|
base_provider::stop();
|
||||||
|
event_system::instance().raise<service_shutdown_end>("sia_provider");
|
||||||
|
}
|
||||||
|
|
||||||
auto sia_provider::upload_file(const std::string &api_path,
|
auto sia_provider::upload_file(const std::string &api_path,
|
||||||
const std::string &source_path,
|
const std::string &source_path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user