diff --git a/libdaggy/src/executors/task/SSHTaskExecutor.cpp b/libdaggy/src/executors/task/SSHTaskExecutor.cpp index 86958e1..61a796b 100644 --- a/libdaggy/src/executors/task/SSHTaskExecutor.cpp +++ b/libdaggy/src/executors/task/SSHTaskExecutor.cpp @@ -130,7 +130,15 @@ bool SSHTaskExecutor::validateTaskParameters(const ConfigValues &job) { return fe_.validateTaskParameters(job); - // TODO add in requirement for memory, cores, users, privkey, port + // TODO add in requirement for users, privkey, port + if (job.count("cores") == 0 or + !std::holds_alternative(job.at("cores"))) + throw std::runtime_error( + R"(Job must define the number of cores it requires)"); + + if (job.count("memoryMB") == 0 or + !std::holds_alternative(job.at("memoryMB"))) + throw std::runtime_error(R"(Job must define the memoryMB it requires)"); return true; }