commit 73994327de890590eede353c8131f3f7c1e8aaa3 Author: Ian Roddis <gitlab@ie2r.com> Date: Wed Aug 25 13:38:29 2021 -0300 - Fixing up checks for individual dag runs commit f20e3a3dec8c063111cf60f2bec2b8f84c8a4100 Author: Ian Roddis <gitlab@ie2r.com> Date: Wed Aug 25 10:49:43 2021 -0300 - Finishing serialization of DAGRun - Checkpointing work. commit b490abadf93e3085e4204003de7eaa8183b4e1d5 Author: Ian Roddis <gitlab@ie2r.com> Date: Wed Aug 25 10:34:08 2021 -0300 - Consolidating struct definitions into Defines.hpp - Renaming DAGRunRecord member runStates to taskRunStates commit 050346ec1fd10d1091f261905c6175ffe0bcf001 Author: Ian Roddis <gitlab@ie2r.com> Date: Wed Aug 25 09:27:05 2021 -0300 - Adding additional tests for server endpoints
34 lines
769 B
C++
34 lines
769 B
C++
#pragma once
|
|
|
|
#include <chrono>
|
|
#include <future>
|
|
#include <string>
|
|
#include <thread>
|
|
#include <vector>
|
|
|
|
#include "daggy/Defines.hpp"
|
|
#include "daggy/ThreadPool.hpp"
|
|
|
|
/*
|
|
Executors run Tasks, returning a future with the results.
|
|
If there are many retries, logs are returned for each attempt.
|
|
*/
|
|
|
|
namespace daggy {
|
|
namespace executors {
|
|
namespace task {
|
|
class TaskExecutor {
|
|
public:
|
|
TaskExecutor(size_t nThreads) : threadPool(nThreads) {};
|
|
|
|
virtual const std::string getName() const = 0;
|
|
|
|
// This will block if the dag_executor is full
|
|
virtual AttemptRecord runCommand(const Task &task) = 0;
|
|
|
|
ThreadPool threadPool;
|
|
};
|
|
}
|
|
}
|
|
}
|