mesos_framework::task_ptr_t mesos_state_t::get_task(const std::string& uid) { for(auto& framework : get_frameworks()) { for(auto& task : framework.get_tasks()) { if(task.first == uid) { return task.second; } } } throw sinsp_exception("Task not found: " + uid); }
mesos_framework::task_ptr_t mesos_state_t::get_task(const std::string& uid) const { for(auto& framework : get_frameworks()) { for(auto& task : framework.get_tasks()) { if(task.first == uid) { return task.second; } } } g_logger.log("Task not found: " + uid, sinsp_logger::SEV_WARNING); return 0; }