コード例 #1
0
ファイル: mesos_state.cpp プロジェクト: bmandrade/sysdig
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);
}
コード例 #2
0
ファイル: mesos_state.cpp プロジェクト: PerthCharles/sysdig
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;
}