Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void orchestrator::__orchestrator_working_thread() {
- while (__orchestrator_running) {
- if (__save_readers) {
- //boost::unique_lock<boost::mutex> scoped_lock(__access_mutex);
- for (boost::unordered_map<std::string, boost::shared_ptr<idnova::base_reader> >::iterator it = __readers_map.begin(); it != __readers_map.end();
- it++) {
- if (it->second->refresh_configuration_unsafe()) {
- if (it->second->is_updated()) {// || next_save_timestamp < boost::posix_time::microsec_clock::local_time()) {
- if (odbi->save_reader(it->second)){
- it->second->set_updated(false);
- }
- }
- std::vector<tag_search_query> tags = it->second->fetch_and_clean_tag_list();
- for (boost::shared_ptr<orchestrator_base_module> obm : __orchestrator_modules) {
- obm->tags_list_callback(tags);
- }
- odbi->save_tags(tags);
- }
- }
- }
- sleep(1); // make it larger!
- }
- //std::cout << std::endl << "####################ORCHESTRATOR WORKING THREAD ENDED####################" << std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement