Commit 5ae086e2 authored by Stanislav Bohm's avatar Stanislav Bohm

WIP

parent 9ca06790
......@@ -62,7 +62,7 @@ public:
void clear_all();
void add_pending_node(TaskNode &node);
void plan_node(TaskNode &node, bool load_checkpoints, std::vector<TaskNode*> &to_load);
void fail_task_on_worker(WorkerConnection &conn);
private:
std::unordered_map<loom::base::Id, std::unique_ptr<TaskNode>> nodes;
std::unordered_set<TaskNode*> pending_nodes;
......
......@@ -48,6 +48,7 @@ void Server::add_worker_connection(std::unique_ptr<WorkerConnection> &&conn)
void Server::remove_worker_connection(WorkerConnection &conn)
{
auto i = std::find_if(
connections.begin(),
connections.end(),
......
......@@ -331,6 +331,14 @@ void TaskManager::release_node(TaskNode *node)
}
}
void TaskManager::fail_task_on_worker(WorkerConnection &conn)
{
std::vector<Id> failed_tasks;
cstate.foreach_node([&conn](const std::unique_ptr<TaskNode> &node) {
TODO
});
}
WorkerConnection *TaskManager::random_worker()
{
auto &connections = server.get_connections();
......
......@@ -46,6 +46,8 @@ public:
void trash_all_tasks();
void release_node(TaskNode *node);
void fail_task_on_worker(WorkerConnection &conn);
WorkerConnection *random_worker();
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment