Moving to a poll method for workers, and daggyd-preserved capacities
This commit is contained in:
@@ -58,13 +58,21 @@ namespace daggy::executors::task {
|
||||
std::string taskName;
|
||||
std::string runnerURL;
|
||||
uint32_t retries;
|
||||
daggy_runner::Capacity resources;
|
||||
};
|
||||
|
||||
// Resolves jobs through polling
|
||||
std::atomic<bool> running_;
|
||||
std::thread monitorWorker_;
|
||||
|
||||
std::unordered_set<std::string> runners_;
|
||||
struct RunnerCapacity
|
||||
{
|
||||
daggy_runner::Capacity current;
|
||||
daggy_runner::Capacity total;
|
||||
};
|
||||
std::mutex runnersGuard_;
|
||||
std::unordered_map<std::string, RunnerCapacity> runners_;
|
||||
|
||||
std::mutex rtGuard_;
|
||||
std::unordered_map<std::pair<DAGRunID, std::string>, RunningTask>
|
||||
runningTasks_;
|
||||
|
||||
Reference in New Issue
Block a user